Closed ningmingxiao closed 1 month ago
It looks like this PR broke the runc crate when async
feature is not enabled.`
@ningmingxiao, @mxpv
$ cargo build -p runc
Compiling runc v0.2.0 (/home/mossaka/developer/spinkube/rust-extensions-fork/crates/runc)
error[E0433]: failed to resolve: use of undeclared crate or module `tokio`
--> crates/runc/src/io.rs:34:5
|
34 | use tokio::net::unix::pipe;
| ^^^^^ use of undeclared crate or module `tokio`
error[E0277]: the trait bound `OwnedFd: std::io::Write` is not satisfied
--> crates/runc/src/io.rs:165:26
|
165 | .map(|x| Box::new(x) as Box<dyn Write + Send + Sync>)
| ^^^^^^^^^^^ the trait `std::io::Write` is not implemented for `OwnedFd`
|
= note: required for the cast from `std::boxed::Box<OwnedFd>` to `std::boxed::Box<dyn std::io::Write + Send + Sync>`
error[E0277]: the trait bound `OwnedFd: std::io::Read` is not satisfied
--> crates/runc/src/io.rs:185:26
|
185 | .map(|x| Box::new(x) as Box<dyn Read + Send>)
| ^^^^^^^^^^^ the trait `std::io::Read` is not implemented for `OwnedFd`
|
= note: required for the cast from `std::boxed::Box<OwnedFd>` to `std::boxed::Box<dyn std::io::Read + Send>`
error[E0277]: the trait bound `OwnedFd: std::io::Read` is not satisfied
--> crates/runc/src/io.rs:205:26
|
205 | .map(|x| Box::new(x) as Box<dyn Read + Send>)
| ^^^^^^^^^^^ the trait `std::io::Read` is not implemented for `OwnedFd`
|
= note: required for the cast from `std::boxed::Box<OwnedFd>` to `std::boxed::Box<dyn std::io::Read + Send>`
hmm, that's bad. Do you want to open a PR?
fix https://github.com/oconnor663/os_pipe.rs/issues/35