diff --git a/asio-sys/Cargo.toml b/asio-sys/Cargo.toml index 34f598a..b1208d5 100644 --- a/asio-sys/Cargo.toml +++ b/asio-sys/Cargo.toml @@ -11,6 +11,5 @@ cc = "1.0.25" [dependencies] lazy_static = "1.0.0" -num = "0.1.42" -num-traits = "0.2.2" -num-derive = "0.2.0" +num-derive = "0.2" +num-traits = "0.2" diff --git a/asio-sys/src/bindings/mod.rs b/asio-sys/src/bindings/mod.rs index 38617af..1ff86af 100644 --- a/asio-sys/src/bindings/mod.rs +++ b/asio-sys/src/bindings/mod.rs @@ -2,6 +2,7 @@ mod asio_import; #[macro_use] pub mod errors; +use num_traits::FromPrimitive; use self::errors::{AsioError, AsioErrorWrapper, LoadDriverError}; use std::ffi::CStr; use std::ffi::CString; @@ -320,7 +321,7 @@ impl Driver { }; unsafe { asio_result!(ai::ASIOGetChannelInfo(&mut channel_info))?; - Ok(num::FromPrimitive::from_i32(channel_info.type_).expect("failed to cast sample type")) + Ok(FromPrimitive::from_i32(channel_info.type_).expect("failed to cast sample type")) } } diff --git a/asio-sys/src/lib.rs b/asio-sys/src/lib.rs index 9a2acc6..a071e7b 100644 --- a/asio-sys/src/lib.rs +++ b/asio-sys/src/lib.rs @@ -4,10 +4,11 @@ #[macro_use] extern crate lazy_static; -extern crate num; #[allow(unused_imports)] #[macro_use] extern crate num_derive; +#[allow(unused_imports)] +extern crate num_traits; #[cfg(asio)] pub mod bindings;