Skip to content

Commit

Permalink
make clippy happy - implicit_clone
Browse files Browse the repository at this point in the history
warning: implicitly cloning a `Vec` by calling `to_owned` on its dereferenced type
   --> src/cmd/excel.rs:262:21
    |
262 |     let sheet_vec = sheet_names.to_owned();
    |                     ^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `sheet_names.clone()`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_clone
    = note: `-W clippy::implicit-clone` implied by `-W clippy::pedantic`

[skip ci]
  • Loading branch information
jqnatividad committed Sep 2, 2023
1 parent 50531d1 commit 7b7b887
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cmd/excel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ pub fn run(argv: &[&str]) -> CliResult<()> {
}
let num_sheets = sheet_names.len();
#[allow(clippy::redundant_clone)]
let sheet_vec = sheet_names.to_owned();
let sheet_vec = sheet_names.clone();

let mut wtr = Config::new(&args.flag_output)
.flexible(args.flag_flexible)
Expand Down

0 comments on commit 7b7b887

Please sign in to comment.