diff options
| author | Shamir Khodzha <khodzha.sh@gmail.com> | 2014-01-14 18:38:06 +0400 |
|---|---|---|
| committer | Shamir Khodzha <khodzha.sh@gmail.com> | 2014-01-14 18:38:06 +0400 |
| commit | 4993c7c804398bd149a1831f55b8180acc83e1da (patch) | |
| tree | 591c224586819933ced095f0e19494c68593fd9f | |
| parent | 901dc2c15e08b6527f084c211d8d93448d997155 (diff) | |
| download | rust-4993c7c804398bd149a1831f55b8180acc83e1da.tar.gz rust-4993c7c804398bd149a1831f55b8180acc83e1da.zip | |
renamed empty() to is_empty()
| -rw-r--r-- | src/libstd/iter.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libstd/iter.rs b/src/libstd/iter.rs index b9d7ee82851..fcf0f4f2444 100644 --- a/src/libstd/iter.rs +++ b/src/libstd/iter.rs @@ -1365,7 +1365,7 @@ impl<'a, A, T: Iterator<A>> Peekable<A, T> { /// Check whether peekable iterator is empty or not. #[inline] - pub fn empty(&mut self) -> bool { + pub fn is_empty(&mut self) -> bool { self.peek().is_some() } } @@ -2930,11 +2930,11 @@ mod tests { assert_eq!(ys, [5, 4, 3, 2, 1]); } - fn test_peekable_empty() { + fn test_peekable_is_empty() { let a = [1]; let mut it = a.iter().peekable(); - assert!( !it.empty() ); + assert!( !it.is_empty() ); it.next(); - assert!( it.empty() ); + assert!( it.is_empty() ); } } |
