Skip to content

Commit

Permalink
Merge pull request #1 from tonsiasy/main
Browse files Browse the repository at this point in the history
fix warning of deprecated function use.
  • Loading branch information
AxlLind authored Apr 1, 2023
2 parents 688d273 + 24213cf commit 763d20e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/logs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ pub fn remove_old(log_folder: &Path) -> Result<(), Error> {
}
let file_stem = path.file_stem().unwrap().to_string_lossy();
let log_time = match NaiveDate::parse_from_str(&file_stem, "%Y-%m-%d") {
Ok(d) => d.and_hms(0, 0, 0),
Ok(d) => d.and_hms_opt(0, 0, 0).unwrap(),
Err(_) => continue,
};
if log_time < deletion_point {
Expand Down

0 comments on commit 763d20e

Please sign in to comment.