Skip to content

Commit

Permalink
Remove min from RangeFrom
Browse files Browse the repository at this point in the history
  • Loading branch information
varkor committed Jan 4, 2018
1 parent f3baa85 commit 439beab
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 12 deletions.
5 changes: 0 additions & 5 deletions src/libcore/iter/range.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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")]
Expand Down
7 changes: 0 additions & 7 deletions src/libcore/tests/iter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down

0 comments on commit 439beab

Please sign in to comment.