diff --git a/src/content/read.rs b/src/content/read.rs index 759a6f6..66023af 100644 --- a/src/content/read.rs +++ b/src/content/read.rs @@ -162,6 +162,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..41b1f75 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, @@ -355,6 +356,7 @@ where /// Ok(()) /// } /// ``` +#[cfg(any(feature = "async-std", feature = "tokio"))] pub async fn reflink_unchecked(cache: P, key: K, to: Q) -> Result<()> where P: AsRef, diff --git a/src/index.rs b/src/index.rs index 8852107..c89bcad 100644 --- a/src/index.rs +++ b/src/index.rs @@ -414,6 +414,7 @@ impl RemoveOpts { } /// Removes an individual index metadata entry. The associated content will be left in the cache. + #[cfg(any(feature = "async-std", feature = "tokio"))] pub async fn remove(self, cache: P, key: K) -> Result<()> where P: AsRef,