Negative case of len()
-> is_empty()
`s/([^\(\s]+\.)len\(\) [(?:!=)>] 0/!$1is_empty()/g`
This commit is contained in:
parent
29ac04402d
commit
10f15e72e6
61 changed files with 142 additions and 142 deletions
|
@ -349,7 +349,7 @@ pub trait Write {
|
|||
/// This function will return the first error that `write` returns.
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
fn write_all(&mut self, mut buf: &[u8]) -> Result<()> {
|
||||
while buf.len() > 0 {
|
||||
while !buf.is_empty() {
|
||||
match self.write(buf) {
|
||||
Ok(0) => return Err(Error::new(ErrorKind::WriteZero,
|
||||
"failed to write whole buffer")),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue