cleanup: auto-fix clippy warnings in poc-memory

Applied cargo clippy --fix for collapsible_if, manual_char_comparison,
and other auto-fixable warnings.
This commit is contained in:
Kent Overstreet 2026-03-21 19:42:38 -04:00
parent 3640de444b
commit 653da40dcd
21 changed files with 99 additions and 149 deletions

View file

@ -63,11 +63,10 @@ pub fn parse_timestamp_to_epoch(ts: &str) -> Option<i64> {
use chrono::{Local, NaiveDateTime, TimeZone};
let formats = ["%Y-%m-%dT%H:%M:%S", "%Y-%m-%dT%H:%M", "%Y-%m-%d %H:%M:%S", "%Y-%m-%d %H:%M"];
for fmt in &formats {
if let Ok(ndt) = NaiveDateTime::parse_from_str(ts, fmt) {
if let Some(dt) = Local.from_local_datetime(&ndt).earliest() {
if let Ok(ndt) = NaiveDateTime::parse_from_str(ts, fmt)
&& let Some(dt) = Local.from_local_datetime(&ndt).earliest() {
return Some(dt.timestamp());
}
}
}
None
}