1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-28 11:37:44 +00:00

tests: fix formating of test_touch.rs

Thanks to Sylvestre!

Co-authored-by: Sylvestre Ledru <sylvestre@debian.org>
This commit is contained in:
Michael Vogt 2024-03-30 12:31:07 +01:00 committed by GitHub
parent a2f8084d48
commit b703ec8795
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -34,7 +34,10 @@ fn set_file_times(at: &AtPath, path: &str, atime: FileTime, mtime: FileTime) {
fn str_to_filetime(format: &str, s: &str) -> FileTime {
let tm = chrono::NaiveDateTime::parse_from_str(s, format).unwrap();
FileTime::from_unix_time(tm.and_utc().timestamp(), tm.and_utc().timestamp_subsec_nanos())
FileTime::from_unix_time(
tm.and_utc().timestamp(),
tm.and_utc().timestamp_subsec_nanos(),
)
}
#[test]