diff --git a/dev/src/uu_mv/mv.rs.html b/dev/src/uu_mv/mv.rs.html index 666773b24..f981b35af 100644 --- a/dev/src/uu_mv/mv.rs.html +++ b/dev/src/uu_mv/mv.rs.html @@ -1032,7 +1032,7 @@ } match rename(sourcepath, &targetpath, b, multi_progress.as_ref()) { - Err(e) if e.to_string() == "" => set_exit_code(1), + Err(e) if e.to_string().is_empty() => set_exit_code(1), Err(e) => { let e = e.map_err_context(|| { format!( diff --git a/dev/src/uu_rmdir/rmdir.rs.html b/dev/src/uu_rmdir/rmdir.rs.html index 95290f943..12c4edd1d 100644 --- a/dev/src/uu_rmdir/rmdir.rs.html +++ b/dev/src/uu_rmdir/rmdir.rs.html @@ -303,7 +303,7 @@ if opts.parents { while let Some(new) = path.parent() { path = new; - if path.as_os_str() == "" { + if path.as_os_str().is_empty() { break; } remove_single(path, opts)?; diff --git a/dev/src/uu_sum/sum.rs.html b/dev/src/uu_sum/sum.rs.html index cca03599b..f0e98f3bf 100644 --- a/dev/src/uu_sum/sum.rs.html +++ b/dev/src/uu_sum/sum.rs.html @@ -203,7 +203,7 @@ Ok(n) if n != 0 => { bytes_read += n; for &byte in buf[..n].iter() { - checksum = (checksum >> 1) + ((checksum & 1) << 15); + checksum = checksum.rotate_right(1); checksum = checksum.wrapping_add(u16::from(byte)); } } diff --git a/dev/src/uu_tsort/tsort.rs.html b/dev/src/uu_tsort/tsort.rs.html index 5294f5346..653a5cbf6 100644 --- a/dev/src/uu_tsort/tsort.rs.html +++ b/dev/src/uu_tsort/tsort.rs.html @@ -174,11 +174,6 @@ 174 175 176 -177 -178 -179 -180 -181
// * This file is part of the uutils coreutils package.
// *
// * (c) Ben Eggers <ben.eggers36@gmail.com>
@@ -352,12 +347,7 @@
}
fn is_acyclic(&self) -> bool {
- for edges in self.out_edges.values() {
- if !edges.is_empty() {
- return false;
- }
- }
- true
- }
+ self.out_edges.values().all(|edge| edge.is_empty())
+ }
}