You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
error[E0277]: the trait bound `TcpSocket: AsFd` is not satisfied
--> src/main.rs:4:49
|
4 | let socket2_socket = socket2::SockRef::from(&tokio_socket);
| ---------------------- ^^^^^^^^^^^^^ the trait `AsFd` is not implemented for `TcpSocket`
| |
| required by a bound introduced by this call
|
= help: the following other types implement trait `AsFd`:
&T
&mut T
Arc<T>
BorrowedFd<'_>
Box<T>
OwnedFd
PidFd
Socket
and 20 others
= note: required for `SockRef<'_>` to implement `From<&TcpSocket>`
For more information about this error, try `rustc --explain E0277`.
The text was updated successfully, but these errors were encountered:
With socket2 0.5 it is no longer possible to use
SockRef::from()
with a tokio socket (using tokio 1.25.0.)The following code works with socket2 0.4:
But breaks with 0.5:
The text was updated successfully, but these errors were encountered: