Skip to content

Commit

Permalink
clippy:clone_on_copy
Browse files Browse the repository at this point in the history
warning: using `clone` on type `Option<&Vec<String>>` which implements the `Copy` trait
    --> src/util.rs:1091:64
     |
1091 |         let reserved_found = if let Some(reserved_names_vec) = reserved_names.clone() {
     |                                                                ^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `reserved_names`
     |
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
     = note: `#[warn(clippy::clone_on_copy)]` on by default
  • Loading branch information
jqnatividad committed Oct 5, 2024
1 parent 97cb0ac commit 34fd553
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1088,7 +1088,7 @@ pub fn safe_header_names(
let mut buf_wrk = String::new();

for header_name in headers {
let reserved_found = if let Some(reserved_names_vec) = reserved_names.clone() {
let reserved_found = if let Some(reserved_names_vec) = reserved_names {
if keep_case {
header_name.clone_into(&mut buf_wrk);
} else {
Expand Down

0 comments on commit 34fd553

Please sign in to comment.