diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2021-07-24 22:30:25 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-24 22:30:25 +0000 |
commit | e88a6cf2ec0b6bd042641f58618d6e72e2c624c4 (patch) | |
tree | 1e1c90155e1c84ad3f2f3929059e3b9513ea00d5 /src/sys/socket/mod.rs | |
parent | 7033d470d000a35236f157258c13dd50bc64725a (diff) | |
parent | 7fd7f27b2ef870ac20dff3d3e23fd32eecb4615f (diff) | |
download | nix-e88a6cf2ec0b6bd042641f58618d6e72e2c624c4.zip |
Merge #1465
1465: Enable creating a const TimeSpec r=asomers a=danieldulaney
Previously, there was no way to create a `TimeSpec` in a `const` context because all creation was through traits. This adds two utility functions to create a `const TimeSpec` from a `libc::timespec` or an `std::time::Duration`.
An alternative approach would be to make the inner `timespec` field `pub`, which would not require any additional functions but would expose some (potentially unwanted) implementation details.
Co-authored-by: Daniel Dulaney <dulaney.daniel@gmail.com>
Co-authored-by: Alan Somers <asomers@gmail.com>
Diffstat (limited to 'src/sys/socket/mod.rs')
0 files changed, 0 insertions, 0 deletions