Remove min from RangeFrom
This commit is contained in:
parent
f3baa85729
commit
439beab41f
@ -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")]
|
||||
|
@ -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));
|
||||
|
Loading…
Reference in New Issue
Block a user