Use only num_traits, no need for full num crate (-6 dependencies)
MODIFY
Cargo.toml
Cargo.toml
@@ -21,7 +21,7 @@ members = ["binding-generator"]
[dependencies]
libc = "0.2"
-num = "0.2"
+num-traits = "0.2"
once_cell = "1.0"
[features]

MODIFY
src/manual/core.rs
src/manual/core.rs
@@ -17,7 +17,7 @@ pub use vector::*;
macro_rules! valid_types {
($trait: ident, $($rust_type: ty),+) => {
/// This sealed trait is implemented for types that are valid to use in corresponding context
- pub trait $trait: ::num::traits::NumAssign + PartialOrd + Default + Copy + private::Sealed {}
+ pub trait $trait: ::num_traits::NumAssign + PartialOrd + Default + Copy + private::Sealed {}
mod private {
pub trait Sealed {}

MODIFY
src/manual/core/matx.rs
src/manual/core/matx.rs
@@ -3,7 +3,7 @@ use std::{
fmt,
};
-use num::{One, Zero};
+use num_traits::{One, Zero};
use crate::{
core::{self, Boxed, ToInputArray, ToInputOutputArray, ToOutputArray},

MODIFY
src/manual/core/point.rs
src/manual/core/point.rs
use std::ops::{Add, AddAssign, Div, DivAssign, Mul, MulAssign, Sub, SubAssign};
-use num::{NumCast, ToPrimitive};
+use num_traits::{NumCast, ToPrimitive};
use crate::core::{Rect_, Size_, ValidRectType, ValidSizeType, ValidVecType, Vec2};

MODIFY
src/manual/core/point3.rs
src/manual/core/point3.rs
use std::ops::{Add, AddAssign, Div, DivAssign, Mul, MulAssign, Sub, SubAssign};
-use num::{NumCast, ToPrimitive, Zero};
+use num_traits::{NumCast, ToPrimitive, Zero};
use crate::core::{Point_, ValidPointType, ValidVecType, Vec3};

MODIFY
src/manual/core/rect.rs
src/manual/core/rect.rs
@@ -4,7 +4,7 @@ use std::{
};
use std::ops::{BitAnd, BitAndAssign, BitOr, BitOrAssign};
-use num::{NumCast, ToPrimitive};
+use num_traits::{NumCast, ToPrimitive};
use crate::core::{Point_, prelude::*, RotatedRect, Size_, ValidPointType, ValidSizeType};

MODIFY
src/manual/core/size.rs
src/manual/core/size.rs
use std::ops::{Add, AddAssign, Div, DivAssign, Mul, MulAssign, Sub, SubAssign};
-use num::{NumCast, ToPrimitive};
+use num_traits::{NumCast, ToPrimitive};
use crate::core::{Point_, ValidPointType};

Use only num_traits, no need for full num crate (-6 dependencies)