Skip to content

Commit

Permalink
fixed clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
janstarke committed Jul 29, 2024
1 parent a6cd326 commit 33f0b6b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions src/bin/evtxanalyze/pstree/process.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down
16 changes: 8 additions & 8 deletions src/common/forensics_timestamp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,14 @@ impl Display for ForensicsTimestamp {
}
}

impl Serialize for ForensicsTimestamp {
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where
S: serde::Serializer {
serializer.serialize_str(&format!("{self}"))
}
}

#[cfg(test)]
mod tests {
use chrono_tz::{Europe, UTC};
Expand All @@ -105,11 +113,3 @@ mod tests {
assert_eq!(ts.to_string(), "2024-05-16T07:45:46+00:00");
}
}

impl Serialize for ForensicsTimestamp {
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where
S: serde::Serializer {
serializer.serialize_str(&format!("{self}"))
}
}

0 comments on commit 33f0b6b

Please sign in to comment.