On 32-bit platforms, libc::suseconds_t is usually i32 instead of i64. This results in a compilation error like the one below, since u32 cannot be converted into i32 without the risk of wrapping.
error[E0277]: the trait bound `i32: From<u32>` is not satisfied
--> /cargo/registry/src/index.crates.io-6f17d22bba15001f/if-addrs-0.13.0/src/posix_not_mac.rs:75:50
|
75 | tv_usec: timeout.subsec_micros().into(),
| ^^^^ the trait `From<u32>` is not implemented for `i32`, which is required by `u32: Into<_>`
|
On 32-bit platforms,
libc::suseconds_t
is usuallyi32
instead ofi64
. This results in a compilation error like the one below, sinceu32
cannot be converted intoi32
without the risk of wrapping.