diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 536bf08..55fd7f0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -52,7 +52,7 @@ jobs: os: [ubuntu-latest, windows-latest] # When updating this, the reminder to update the minimum supported # Rust version in Cargo.toml. - rust: ['1.48'] + rust: ['1.63'] steps: - uses: actions/checkout@v3 - name: Install Rust diff --git a/Cargo.toml b/Cargo.toml index 9ee6f3c..42c4b47 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -6,7 +6,7 @@ name = "async-fs" version = "1.6.0" authors = ["Stjepan Glavina "] edition = "2018" -rust-version = "1.48" +rust-version = "1.63" description = "Async filesystem primitives" license = "Apache-2.0 OR MIT" repository = "https://github.com/smol-rs/async-fs" diff --git a/build.rs b/build.rs deleted file mode 100644 index 10a25b1..0000000 --- a/build.rs +++ /dev/null @@ -1,16 +0,0 @@ -fn main() { - let cfg = match autocfg::AutoCfg::new() { - Ok(cfg) => cfg, - Err(e) => { - println!( - "cargo:warning=async-fs: failed to detect compiler features: {}", - e - ); - return; - } - }; - - if !cfg.probe_rustc_version(1, 63) { - autocfg::emit("async_fs_no_io_safety"); - } -} diff --git a/src/lib.rs b/src/lib.rs index 80235ed..f0e5e53 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1091,28 +1091,28 @@ impl std::os::windows::io::AsRawHandle for File { } } -#[cfg(all(not(async_fs_no_io_safety), unix))] +#[cfg(unix)] impl From for File { fn from(fd: std::os::unix::io::OwnedFd) -> Self { File::from(std::fs::File::from(fd)) } } -#[cfg(all(not(async_fs_no_io_safety), windows))] +#[cfg(windows)] impl From for File { fn from(fd: std::os::windows::io::OwnedHandle) -> Self { File::from(std::fs::File::from(fd)) } } -#[cfg(all(not(async_fs_no_io_safety), unix))] +#[cfg(unix)] impl std::os::unix::io::AsFd for File { fn as_fd(&self) -> std::os::unix::io::BorrowedFd<'_> { self.file.as_fd() } } -#[cfg(all(not(async_fs_no_io_safety), windows))] +#[cfg(windows)] impl std::os::windows::io::AsHandle for File { fn as_handle(&self) -> std::os::windows::io::BorrowedHandle<'_> { self.file.as_handle()