summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFlorian Hartwig <florian.j.hartwig@gmail.com>2015-04-23 15:06:05 +0200
committerFlorian Hartwig <florian.j.hartwig@gmail.com>2015-04-24 00:23:44 +0200
commit6bbc43beaca66163ad22206ee45add129b1e7dc1 (patch)
treebd666e061e42230314611ae15ea1e09c0c59526f /src
parent86680639ba8aa418070e5f5f930d56b0e3010f2b (diff)
downloadnix-6bbc43beaca66163ad22206ee45add129b1e7dc1.zip
FromPrimitive is no more
Diffstat (limited to 'src')
-rw-r--r--src/errno.rs4
-rw-r--r--src/sys/socket/addr.rs2
-rw-r--r--src/sys/socket/mod.rs2
3 files changed, 4 insertions, 4 deletions
diff --git a/src/errno.rs b/src/errno.rs
index ceb035d6..30d3b33e 100644
--- a/src/errno.rs
+++ b/src/errno.rs
@@ -442,7 +442,7 @@ fn desc(errno: Errno) -> &'static str {
#[cfg(any(target_os = "linux", target_os = "android"))]
mod consts {
- #[derive(Debug, Clone, PartialEq, FromPrimitive, Copy)]
+ #[derive(Debug, Clone, PartialEq, Copy)]
pub enum Errno {
UnknownErrno = 0,
EPERM = 1,
@@ -732,7 +732,7 @@ mod consts {
#[cfg(any(target_os = "macos", target_os = "ios"))]
mod consts {
- #[derive(Copy, Debug, Clone, PartialEq, FromPrimitive)]
+ #[derive(Copy, Debug, Clone, PartialEq)]
pub enum Errno {
UnknownErrno = 0,
EPERM = 1,
diff --git a/src/sys/socket/addr.rs b/src/sys/socket/addr.rs
index 1ae5a9c3..91052c77 100644
--- a/src/sys/socket/addr.rs
+++ b/src/sys/socket/addr.rs
@@ -16,7 +16,7 @@ use std::os::unix::ffi::OsStrExt;
*/
#[repr(i32)]
-#[derive(Copy, Clone, PartialEq, Eq, Debug, Hash, FromPrimitive)]
+#[derive(Copy, Clone, PartialEq, Eq, Debug, Hash)]
pub enum AddressFamily {
Unix = consts::AF_UNIX,
Inet = consts::AF_INET,
diff --git a/src/sys/socket/mod.rs b/src/sys/socket/mod.rs
index 0db5bc29..5eaf87c7 100644
--- a/src/sys/socket/mod.rs
+++ b/src/sys/socket/mod.rs
@@ -56,7 +56,7 @@ pub struct sockaddr_storage {
pub __ss_pad2: [u8; 120],
}
-#[derive(Clone, Copy, PartialEq, Eq, Debug, FromPrimitive)]
+#[derive(Clone, Copy, PartialEq, Eq, Debug)]
#[repr(i32)]
pub enum SockType {
Stream = consts::SOCK_STREAM,