]> git.lizzy.rs Git - rust.git/commitdiff
core: Forward ExactSizeIterator::is_empty for Bytes
authorUlrik Sverdrup <bluss@users.noreply.github.com>
Sat, 3 Dec 2016 20:43:51 +0000 (21:43 +0100)
committerUlrik Sverdrup <bluss@users.noreply.github.com>
Sun, 4 Dec 2016 14:46:36 +0000 (15:46 +0100)
src/libcore/str/mod.rs

index b4cd52e59f658079a1be9f6e0ef86090b0a8c2a9..de418b831cc8842f0061c6df8319c2fdf26eebc7 100644 (file)
@@ -618,6 +618,11 @@ impl<'a> ExactSizeIterator for Bytes<'a> {
     fn len(&self) -> usize {
         self.0.len()
     }
+
+    #[inline]
+    fn is_empty(&self) -> bool {
+        self.0.is_empty()
+    }
 }
 
 #[unstable(feature = "fused", issue = "35602")]