Skip to content

Commit

Permalink
fix clippy ==0 be replaced is_empty() (use-ink#137)
Browse files Browse the repository at this point in the history
  • Loading branch information
honeywest authored Jan 7, 2021
1 parent 347eb50 commit b2c5602
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ fn zip_dir(src_dir: &PathBuf, dst_file: &PathBuf, method: CompressionMethod) ->
f.read_to_end(&mut buffer)?;
zip.write_all(&*buffer)?;
buffer.clear();
} else if name.as_os_str().len() != 0 {
} else if !name.as_os_str().is_empty() {
zip.add_directory(file_path, options)?;
}
}
Expand Down
2 changes: 1 addition & 1 deletion metadata/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ impl ContractBuilder {
.map(|s| s.as_ref().to_string())
.collect::<Vec<_>>();

if authors.len() == 0 {
if authors.is_empty() {
panic!("must have at least one author")
}

Expand Down

0 comments on commit b2c5602

Please sign in to comment.