about summary refs log tree commit diff
path: root/src/libstd/sys
diff options
context:
space:
mode:
authorTobias Bucher <tobiasbucher5991@gmail.com>2016-06-23 12:26:15 +0200
committerTobias Bucher <tobiasbucher5991@gmail.com>2016-06-23 12:26:15 +0200
commit8ff5c4394cdfc11f29de36123a6c9618e12c9904 (patch)
tree08da69f839f5c24c845a9b54fa2b2d63c9a7cb4d /src/libstd/sys
parent4960f2f9074d0d0f9de80b39f0b0ded6547e2ad8 (diff)
downloadrust-8ff5c4394cdfc11f29de36123a6c9618e12c9904.tar.gz
rust-8ff5c4394cdfc11f29de36123a6c9618e12c9904.zip
Use `len` instead of `size_hint` where appropiate
This makes it clearer that we're not just looking for a lower bound but
rather know that the iterator is an `ExactSizeIterator`.
Diffstat (limited to 'src/libstd/sys')
-rw-r--r--src/libstd/sys/common/wtf8.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstd/sys/common/wtf8.rs b/src/libstd/sys/common/wtf8.rs
index d705b8986d0..b6be85a4dfa 100644
--- a/src/libstd/sys/common/wtf8.rs
+++ b/src/libstd/sys/common/wtf8.rs
@@ -715,7 +715,7 @@ impl<'a> Iterator for Wtf8CodePoints<'a> {
 
     #[inline]
     fn size_hint(&self) -> (usize, Option<usize>) {
-        let (len, _) = self.bytes.size_hint();
+        let len = self.bytes.len();
         (len.saturating_add(3) / 4, Some(len))
     }
 }