From 29ac04402d53d358a1f6200bea45a301ff05b2d1 Mon Sep 17 00:00:00 2001 From: Tamir Duberstein Date: Tue, 24 Mar 2015 16:53:34 -0700 Subject: Positive case of `len()` -> `is_empty()` `s/(? HashSet /// assert!(!v.is_empty()); /// ``` #[stable(feature = "rust1", since = "1.0.0")] - pub fn is_empty(&self) -> bool { self.map.len() == 0 } + pub fn is_empty(&self) -> bool { self.map.is_empty() } /// Clears the set, returning all elements in an iterator. #[inline] diff --git a/src/libstd/sys/windows/process2.rs b/src/libstd/sys/windows/process2.rs index 74953921921..3d5c9867a6f 100644 --- a/src/libstd/sys/windows/process2.rs +++ b/src/libstd/sys/windows/process2.rs @@ -381,7 +381,7 @@ fn make_command_line(prog: &OsStr, args: &[OsString]) -> Vec { // it will be dropped entirely when parsed on the other end. let arg_bytes = &arg.as_inner().inner.as_inner(); let quote = arg_bytes.iter().any(|c| *c == b' ' || *c == b'\t') - || arg_bytes.len() == 0; + || arg_bytes.is_empty(); if quote { cmd.push('"' as u16); } -- cgit 1.4.1-3-g733a5