diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2022-05-30 22:36:43 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-30 22:36:43 +0000 |
commit | 7e8757f4dff4831010677c6d628b05369619c6d6 (patch) | |
tree | 93e6c56c51f6672c2c2f1f47ad34acc9004761e0 /CONVENTIONS.md | |
parent | e3932c466f7774188178c414df6a181bf26b0a90 (diff) | |
parent | 51f1ef33a41477e2dc32ba857b5b591c9bda4041 (diff) | |
download | nix-7e8757f4dff4831010677c6d628b05369619c6d6.zip |
Merge #1727
1727: Add From<uid_t> and From<gid_t> r=rtzoeller a=vkkoskie
Conversions to/from primitive uid_t and gid_t to newtype Uid and Gid types are valid and infallible, but are only implemented in one direction. This provides the counterparts in the other direction.
These conversions are identical in behavior to the from_raw methods. However, using the more idiomatic From trait enables easier interoperability with other crates (e.g., deserialization with serde)
Co-authored-by: Keith Koskie <vkkoskie@gmail.com>
Diffstat (limited to 'CONVENTIONS.md')
0 files changed, 0 insertions, 0 deletions