File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff 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+ ) ) ]
4355async 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 ;
You can’t perform that action at this time.
0 commit comments