bilelmoussaoui / oo7

James Bond went on a new mission as a Secret Service provider
https://bilelmoussaoui.github.io/oo7/oo7/
MIT License
63 stars 12 forks source link

tokio doesn't implement `IntoRawFd` for `UnixStream` #30

Closed zecakeh closed 1 year ago

zecakeh commented 1 year ago

This makes the version 0.1.0-beta.1 fail to compile when using this library because of this line:

https://github.com/bilelmoussaoui/oo7/blob/ea0ce3881622bfc349d63f68f41632bfbbe6a470/src/portal/secret.rs#L156

Here is the error message:

error[E0599]: no method named `into_raw_fd` found for struct `tokio::net::UnixStream` in the current scope
   --> /path/to/project/_build/cargo-home/registry/src/github.com-1ecc6299db9ec823/oo7-0.1.0-beta.1/src/portal/secret.rs:156:53
    |
156 |     let owned_x2 = unsafe { OwnedFd::from_raw_fd(x2.into_raw_fd()) };

This is a regression introduced by cb1c1b8c80a2a89dc1816077bd4f07dd98aeabf3.

Context: trying to bump the version in Fractal.

zecakeh commented 1 year ago

I'm not sure what the best course of action is for fixing this.

It implements AsRawFd so it could be used instead?

bilelmoussaoui commented 1 year ago

cc @A6GibKm

A6GibKm commented 1 year ago

Yes, ill fix it today. Unfortunately one has to use UnixStream from std::net.