diff --git a/rt/Cargo.toml b/rt/Cargo.toml index 83955b58b..cf3b06b7a 100644 --- a/rt/Cargo.toml +++ b/rt/Cargo.toml @@ -18,7 +18,7 @@ edition = "2021" test = ["heph/test"] [dependencies] -a10 = { version = "0.1.0", default-features = false, features = ["nightly"] } +a10 = { version = "0.1.1", default-features = false, features = ["nightly"] } heph = { version = "0.5.0", path = "../", default-features = false } heph-inbox = { version = "0.2.3", path = "../inbox", default-features = false } log = { version = "0.4.17", default-features = false, features = ["kv_unstable", "kv_unstable_std"] } diff --git a/rt/src/io/mod.rs b/rt/src/io/mod.rs index bb4e05e28..069e65bf6 100644 --- a/rt/src/io/mod.rs +++ b/rt/src/io/mod.rs @@ -67,9 +67,7 @@ macro_rules! stdio { ) => { #[doc = concat!("Create a new `", stringify!($name), "`.\n\n")] pub fn $fn(rt: &RT) -> $name { - let fd = std::mem::ManuallyDrop::new(unsafe { - a10::AsyncFd::from_raw_fd($fd, rt.submission_queue()) - }); + let fd = a10::io::$fn(rt.submission_queue()); $name { fd } } @@ -81,7 +79,7 @@ macro_rules! stdio { )] #[derive(Debug)] pub struct $name { - fd: std::mem::ManuallyDrop, + fd: a10::io::$name, } }; }