diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f6dda61..ac1c4f5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,7 +28,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - rust: [1.67.0, stable] + rust: [1.70.0, stable] os: [ubuntu-latest, macOS-latest, windows-latest] steps: diff --git a/src/content/read.rs b/src/content/read.rs index 759a6f6..39efbdb 100644 --- a/src/content/read.rs +++ b/src/content/read.rs @@ -6,10 +6,8 @@ use std::pin::Pin; #[cfg(any(feature = "async-std", feature = "tokio"))] use std::task::{Context, Poll}; -#[cfg(feature = "async-std")] -use futures::io::AsyncReadExt; -#[cfg(feature = "tokio")] -use tokio::io::AsyncReadExt; +#[cfg(any(feature = "async-std", feature = "tokio"))] +use crate::async_lib::AsyncReadExt; use ssri::{Algorithm, Integrity, IntegrityChecker}; @@ -162,6 +160,7 @@ pub fn reflink(cache: &Path, sri: &Integrity, to: &Path) -> Result<()> { reflink_unchecked(cache, sri, to) } +#[cfg(any(feature = "async-std", feature = "tokio"))] pub async fn reflink_async(cache: &Path, sri: &Integrity, to: &Path) -> Result<()> { let mut reader = open_async(cache, sri.clone()).await?; let mut buf = [0u8; 1024 * 8]; diff --git a/src/get.rs b/src/get.rs index a43f49c..374a154 100644 --- a/src/get.rs +++ b/src/get.rs @@ -319,6 +319,7 @@ where /// Ok(()) /// } /// ``` +#[cfg(any(feature = "async-std", feature = "tokio"))] pub async fn reflink
(cache: P, key: K, to: Q) -> Result<()>
where
P: AsRef (cache: P, key: K, to: Q) -> Result<()>
where
P: AsRef (cache: P, sri: &Integrity, to: Q) -> Result<()>
where
P: AsRef (self, cache: P, key: K) -> Result<()>
where
P: AsRef