Skip to content

Commit 5afe5b4

Browse files
committed
Update to Rust 2021.
1 parent ddbef00 commit 5afe5b4

2 files changed

Lines changed: 7 additions & 10 deletions

File tree

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ description = "Set filesystem timestamps"
66
documentation = "https://docs.rs/fs-set-times"
77
license = "Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT"
88
repository = "https://github.com/bytecodealliance/fs-set-times"
9-
edition = "2018"
9+
edition = "2021"
1010
keywords = ["api", "file"]
1111
categories = ["filesystem"]
1212
exclude = ["/.github"]

src/set_times.rs

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,14 @@
11
use crate::SystemTimeSpec;
22
use io_lifetimes::AsFilelike;
3+
#[cfg(not(windows))]
4+
use rustix::{
5+
fs::{futimens, utimensat, AtFlags, Timestamps, CWD},
6+
fs::{UTIME_NOW, UTIME_OMIT},
7+
time::Timespec,
8+
};
39
use std::path::Path;
410
use std::time::SystemTime;
511
use std::{fs, io};
6-
#[cfg(not(windows))]
7-
use {
8-
rustix::{
9-
fs::{futimens, utimensat, AtFlags, Timestamps, CWD},
10-
fs::{UTIME_NOW, UTIME_OMIT},
11-
time::Timespec,
12-
},
13-
std::convert::TryInto,
14-
};
1512
#[cfg(windows)]
1613
use {
1714
std::{

0 commit comments

Comments
 (0)