From 33f0b6b1e6359dbf23c4f715b0845431c5ae00c5 Mon Sep 17 00:00:00 2001 From: Jan Starke Date: Mon, 29 Jul 2024 12:34:39 +0200 Subject: [PATCH] fixed clippy warnings --- src/bin/evtxanalyze/pstree/process.rs | 4 ++-- src/common/forensics_timestamp.rs | 16 ++++++++-------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/bin/evtxanalyze/pstree/process.rs b/src/bin/evtxanalyze/pstree/process.rs index 44f9a43..d61e821 100644 --- a/src/bin/evtxanalyze/pstree/process.rs +++ b/src/bin/evtxanalyze/pstree/process.rs @@ -59,10 +59,10 @@ impl From<&Process> for ProcessTableEntry { subject_user_name: value.subject_user_name.clone(), subject_domain_name: value.subject_domain_name.clone(), subject_logon_id: value.subject_logon_id.clone(), - new_process_id: value.new_process_id.clone(), + new_process_id: value.new_process_id, new_process_name: value.new_process_name.clone(), token_elevation_type: value.token_elevation_type.clone(), - process_id: value.process_id.clone(), + process_id: value.process_id, command_line: value.command_line.clone(), target_user_sid: value.target_user_sid.clone(), target_user_name: value.target_user_name.clone(), diff --git a/src/common/forensics_timestamp.rs b/src/common/forensics_timestamp.rs index f9c1c45..4c88285 100644 --- a/src/common/forensics_timestamp.rs +++ b/src/common/forensics_timestamp.rs @@ -90,6 +90,14 @@ impl Display for ForensicsTimestamp { } } +impl Serialize for ForensicsTimestamp { + fn serialize(&self, serializer: S) -> Result + where + S: serde::Serializer { + serializer.serialize_str(&format!("{self}")) + } +} + #[cfg(test)] mod tests { use chrono_tz::{Europe, UTC}; @@ -105,11 +113,3 @@ mod tests { assert_eq!(ts.to_string(), "2024-05-16T07:45:46+00:00"); } } - -impl Serialize for ForensicsTimestamp { - fn serialize(&self, serializer: S) -> Result - where - S: serde::Serializer { - serializer.serialize_str(&format!("{self}")) - } -}