diff options
author | est31 <MTest31@outlook.com> | 2019-06-02 07:12:44 +0200 |
---|---|---|
committer | est31 <MTest31@outlook.com> | 2019-06-03 04:18:12 +0200 |
commit | e64de8d90acba327d4276f5b872d2b6eaa1bde9c (patch) | |
tree | 6de0b941b63273736dcf31e6aa8ed60e5b07cbb7 /components/range | |
parent | 8b6ed3d1823876fa7e3c5ff6b1a9036aa22a72f4 (diff) | |
download | servo-e64de8d90acba327d4276f5b872d2b6eaa1bde9c.tar.gz servo-e64de8d90acba327d4276f5b872d2b6eaa1bde9c.zip |
Remove unused code from a bunch of crates
Diffstat (limited to 'components/range')
-rw-r--r-- | components/range/lib.rs | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/components/range/lib.rs b/components/range/lib.rs index 0e0cbf76be9..b968eacb3b0 100644 --- a/components/range/lib.rs +++ b/components/range/lib.rs @@ -18,8 +18,6 @@ pub trait Int: { fn zero() -> Self; fn one() -> Self; - fn max_value() -> Self; - fn from_usize(n: usize) -> Option<Self>; fn to_usize(self) -> usize; } impl Int for isize { @@ -32,14 +30,6 @@ impl Int for isize { 1 } #[inline] - fn max_value() -> isize { - ::std::isize::MAX - } - #[inline] - fn from_usize(n: usize) -> Option<isize> { - num_traits::NumCast::from(n) - } - #[inline] fn to_usize(self) -> usize { num_traits::NumCast::from(self).unwrap() } @@ -54,14 +44,6 @@ impl Int for usize { 1 } #[inline] - fn max_value() -> usize { - ::std::usize::MAX - } - #[inline] - fn from_usize(n: usize) -> Option<usize> { - Some(n) - } - #[inline] fn to_usize(self) -> usize { self } @@ -134,10 +116,6 @@ macro_rules! int_range_index { #[inline] fn one() -> $Self_ { $Self_($crate::Int::one()) } #[inline] - fn max_value() -> $Self_ { $Self_($crate::Int::max_value()) } - #[inline] - fn from_usize(n: usize) -> Option<$Self_> { $crate::Int::from_usize(n).map($Self_) } - #[inline] fn to_usize(self) -> usize { self.to_usize() } } |