diff options
author | Alan Somers <asomers@gmail.com> | 2020-05-16 17:16:48 -0600 |
---|---|---|
committer | Alan Somers <asomers@gmail.com> | 2020-06-27 17:36:45 -0600 |
commit | 729e7828263fec48d80ef6cc68b14b96da0206e1 (patch) | |
tree | 163178b86a0e4c3ce550f19848f138e4ffb65823 /src/sys/socket/mod.rs | |
parent | 6f68bfdf0ea6166733f655cde48ad7125f9e31e0 (diff) | |
download | nix-729e7828263fec48d80ef6cc68b14b96da0206e1.zip |
implement Default for UnixCredentials on Linux
Diffstat (limited to 'src/sys/socket/mod.rs')
-rw-r--r-- | src/sys/socket/mod.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/sys/socket/mod.rs b/src/sys/socket/mod.rs index 41bc7aa9..d9b94f07 100644 --- a/src/sys/socket/mod.rs +++ b/src/sys/socket/mod.rs @@ -221,6 +221,12 @@ cfg_if! { } } + impl Default for UnixCredentials { + fn default() -> Self { + Self::new() + } + } + impl From<libc::ucred> for UnixCredentials { fn from(cred: libc::ucred) -> Self { UnixCredentials(cred) |