Skip to content

Commit 9f0b8f3

Browse files
committed
fix cfg
1 parent bdc064d commit 9f0b8f3

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

tokio/src/fs/write.rs

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,13 @@ pub async fn write(path: impl AsRef<Path>, contents: impl AsRef<[u8]>) -> io::Re
2727
let path = path.as_ref();
2828
let contents = crate::util::as_ref::upgrade(contents);
2929

30-
#[cfg(all(tokio_uring, feature = "rt", feature = "fs", target_os = "linux"))]
30+
#[cfg(all(
31+
tokio_unstable,
32+
feature = "io-uring",
33+
feature = "rt",
34+
feature = "fs",
35+
target_os = "linux"
36+
))]
3137
{
3238
let handle = crate::runtime::Handle::current();
3339
let driver_handle = handle.inner.driver().io();
@@ -39,7 +45,13 @@ pub async fn write(path: impl AsRef<Path>, contents: impl AsRef<[u8]>) -> io::Re
3945
write_spawn_blocking(path, contents).await
4046
}
4147

42-
#[cfg(all(tokio_uring, feature = "rt", feature = "fs", target_os = "linux"))]
48+
#[cfg(all(
49+
tokio_unstable,
50+
feature = "io-uring",
51+
feature = "rt",
52+
feature = "fs",
53+
target_os = "linux"
54+
))]
4355
async fn write_uring(path: &Path, mut buf: OwnedBuf) -> io::Result<()> {
4456
use crate::{fs::OpenOptions, runtime::driver::op::Op};
4557
use std::os::fd::OwnedFd;

0 commit comments

Comments
 (0)