From a0b9e301a722f8e7b2ba74ed30cf5fffed4d7acf Mon Sep 17 00:00:00 2001 From: Artem Starikov Date: Thu, 6 Mar 2025 16:05:37 +0300 Subject: [PATCH] fix: compilation failure without any async runtime --- src/content/write.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/content/write.rs b/src/content/write.rs index 8b7961e..dcfd896 100644 --- a/src/content/write.rs +++ b/src/content/write.rs @@ -19,6 +19,7 @@ use tempfile::NamedTempFile; use crate::async_lib::{AsyncWrite, JoinHandle}; use crate::content::path; use crate::errors::{IoErrorExt, Result}; +#[cfg(any(feature = "async-std", feature = "tokio"))] use crate::Error; #[cfg(feature = "mmap")] @@ -425,7 +426,7 @@ fn update_state( } } -#[cfg(not(feature = "tokio"))] +#[cfg(feature = "async-std")] /// Update the state. fn update_state(current_state: &mut State, next_state: State) { *current_state = next_state;