mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-08-04 15:07:47 +00:00
refactor/polish ~ fix cargo clippy
complaints (trivially_copy_pass_by_ref)
This commit is contained in:
parent
37a3db1819
commit
8f2cdcfcb5
1 changed files with 3 additions and 3 deletions
|
@ -369,8 +369,8 @@ fn get_size(size_str_opt: Option<String>) -> Option<u64> {
|
||||||
Some(coeff * unit)
|
Some(coeff * unit)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn pass_name(pass_type: &PassType) -> String {
|
fn pass_name(pass_type: PassType) -> String {
|
||||||
match *pass_type {
|
match pass_type {
|
||||||
PassType::Random => String::from("random"),
|
PassType::Random => String::from("random"),
|
||||||
PassType::Pattern(bytes) => {
|
PassType::Pattern(bytes) => {
|
||||||
let mut s: String = String::new();
|
let mut s: String = String::new();
|
||||||
|
@ -451,7 +451,7 @@ fn wipe_file(
|
||||||
|
|
||||||
for (i, pass_type) in pass_sequence.iter().enumerate() {
|
for (i, pass_type) in pass_sequence.iter().enumerate() {
|
||||||
if verbose {
|
if verbose {
|
||||||
let pass_name: String = pass_name(pass_type);
|
let pass_name: String = pass_name(*pass_type);
|
||||||
if total_passes.to_string().len() == 1 {
|
if total_passes.to_string().len() == 1 {
|
||||||
println!(
|
println!(
|
||||||
"{}: {}: pass {}/{} ({})... ",
|
"{}: {}: pass {}/{} ({})... ",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue