Skip to content

Commit 8fb70be

Browse files
koutecarllerche
authored andcommitted
Derive FromPrimitive for AddressFamily.
1 parent c5bc332 commit 8fb70be

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/sys/socket/addr.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ use std::os::unix::OsStrExt;
1515
*/
1616

1717
#[repr(i32)]
18-
#[derive(Copy, Clone, PartialEq, Eq, Debug, Hash)]
18+
#[derive(Copy, Clone, PartialEq, Eq, Debug, Hash, FromPrimitive)]
1919
pub enum AddressFamily {
2020
Unix = consts::AF_UNIX,
2121
Inet = consts::AF_INET,

0 commit comments

Comments
 (0)