File tree 2 files changed +14
-0
lines changed
2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,8 @@ This project adheres to [Semantic Versioning](https://semver.org/).
9
9
- Added ` aio_writev ` and ` aio_readv ` .
10
10
(#[ 1713] ( https://github.com/nix-rust/nix/pull/1713 ) )
11
11
12
+ - impl ` From<uid_t> ` for ` Uid ` and ` From<gid_t> ` for ` Gid `
13
+ (#[ 1727] ( https://github.com/nix-rust/nix/pull/1727 ) )
12
14
- impl From<SockaddrIn > for std::net::SocketAddrV4 and
13
15
impl From<SockaddrIn6 > for std::net::SocketAddrV6.
14
16
(#[ 1711] ( https://github.com/nix-rust/nix/pull/1711 ) )
Original file line number Diff line number Diff line change @@ -87,6 +87,12 @@ impl From<Uid> for uid_t {
87
87
}
88
88
}
89
89
90
+ impl From <uid_t> for Uid {
91
+ fn from( uid: uid_t) -> Self {
92
+ Uid ( uid)
93
+ }
94
+ }
95
+
90
96
impl fmt:: Display for Uid {
91
97
fn fmt( & self , f: & mut fmt:: Formatter ) -> fmt:: Result {
92
98
fmt:: Display :: fmt( & self . 0 , f)
@@ -131,6 +137,12 @@ impl From<Gid> for gid_t {
131
137
}
132
138
}
133
139
140
+ impl From <gid_t> for Gid {
141
+ fn from( gid: gid_t) -> Self {
142
+ Gid ( gid)
143
+ }
144
+ }
145
+
134
146
impl fmt:: Display for Gid {
135
147
fn fmt( & self , f: & mut fmt:: Formatter ) -> fmt:: Result {
136
148
fmt:: Display :: fmt( & self . 0 , f)
You can’t perform that action at this time.
0 commit comments