about summary refs log tree commit diff
path: root/src/libstd/rand/reader.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2015-04-16 03:22:21 +0000
committerbors <bors@rust-lang.org>2015-04-16 03:22:21 +0000
commit288809c8f35d9b37f2e4f5c3ac168f56dbc3bbc4 (patch)
tree2606f4c9c39c215161feb41a74348d7e07d79c1c /src/libstd/rand/reader.rs
parente40449e0d545561c73a9b9b324b5971b533a87b7 (diff)
parentc55ae1dc3094912c935fb95cf915841af0259305 (diff)
Auto merge of #23682 - tamird:DRY-is-empty, r=alexcrichton
r? @alexcrichton 
Diffstat (limited to 'src/libstd/rand/reader.rs')
-rw-r--r--src/libstd/rand/reader.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstd/rand/reader.rs b/src/libstd/rand/reader.rs
index 60645707c6a..f8dd6a00c7f 100644
--- a/src/libstd/rand/reader.rs
+++ b/src/libstd/rand/reader.rs
@@ -51,7 +51,7 @@ impl<R: Read> Rng for ReaderRng<R> {
         unsafe { *(bytes.as_ptr() as *const u64) }
     }
     fn fill_bytes(&mut self, mut v: &mut [u8]) {
-        while v.len() > 0 {
+        while !v.is_empty() {
             let t = v;
             match self.reader.read(t) {
                 Ok(0) => panic!("ReaderRng.fill_bytes: EOF reached"),