Remove min from RangeFrom

This commit is contained in:
varkor 2018-01-04 15:03:50 +00:00
parent f3baa85729
commit 439beab41f
2 changed files with 0 additions and 12 deletions
src/libcore

View File

@ -312,11 +312,6 @@ impl<A: Step> Iterator for ops::RangeFrom<A> {
self.start = plus_n.add_one();
Some(plus_n)
}
#[inline]
fn min(self) -> Option<A> {
Some(self.start)
}
}
#[unstable(feature = "fused", issue = "35602")]

View File

@ -1359,13 +1359,6 @@ fn test_range_max() {
assert_eq!((1..1).max(), None);
}
#[test]
fn test_range_from_min() {
assert_eq!((0..).min(), Some(0));
assert_eq!((-20..).min(), Some(-20));
assert_eq!((20..).min(), Some(20));
}
#[test]
fn test_range_inc_last_max() {
assert_eq!((0..=20).last(), Some(20));