Skip to content

Commit

Permalink
chore: clippy::needless_borrows_for_generic_args
Browse files Browse the repository at this point in the history
warning: the borrowed expression implements the required traits
   --> src/cmd/joinp.rs:416:73
    |
416 |                       .with_column(col.clone().str().to_lowercase().alias(&format!(
    |  _________________________________________________________________________^
417 | |                         "_qsv-{}-lower",
418 | |                         col.to_string()
419 | |                             .trim_start_matches(r#"col(""#)
420 | |                             .trim_end_matches(r#"")"#)
421 | |                     )));
    | |_____________________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
    = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default
help: change this to
    |
416 ~                     .with_column(col.clone().str().to_lowercase().alias(format!(
417 +                         "_qsv-{}-lower",
418 +                         col.to_string()
419 +                             .trim_start_matches(r#"col(""#)
420 +                             .trim_end_matches(r#"")"#)
421 ~                     )));
    |

warning: the borrowed expression implements the required traits
   --> src/cmd/joinp.rs:428:73
    |
428 |                       .with_column(col.clone().str().to_lowercase().alias(&format!(
    |  _________________________________________________________________________^
429 | |                         "_qsv-{}-lower",
430 | |                         col.to_string()
431 | |                             .trim_start_matches(r#"col(""#)
432 | |                             .trim_end_matches(r#"")"#)
433 | |                     )));
    | |_____________________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
help: change this to
    |
428 ~                     .with_column(col.clone().str().to_lowercase().alias(format!(
429 +                         "_qsv-{}-lower",
430 +                         col.to_string()
431 +                             .trim_start_matches(r#"col(""#)
432 +                             .trim_end_matches(r#"")"#)
433 ~                     )));
    |

warning: the borrowed expression implements the required traits
   --> src/cmd/joinp.rs:440:44
    |
440 |                       polars::lazy::dsl::col(&format!(
    |  ____________________________________________^
441 | |                         "_qsv-{}-lower",
442 | |                         col.to_string()
443 | |                             .trim_start_matches(r#"col(""#)
444 | |                             .trim_end_matches(r#"")"#)
445 | |                     ))
    | |_____________________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
help: change this to
    |
440 ~                     polars::lazy::dsl::col(format!(
441 +                         "_qsv-{}-lower",
442 +                         col.to_string()
443 +                             .trim_start_matches(r#"col(""#)
444 +                             .trim_end_matches(r#"")"#)
445 ~                     ))
    |

warning: the borrowed expression implements the required traits
   --> src/cmd/joinp.rs:452:44
    |
452 |                       polars::lazy::dsl::col(&format!(
    |  ____________________________________________^
453 | |                         "_qsv-{}-lower",
454 | |                         col.to_string()
455 | |                             .trim_start_matches(r#"col(""#)
456 | |                             .trim_end_matches(r#"")"#)
457 | |                     ))
    | |_____________________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
help: change this to
    |
452 ~                     polars::lazy::dsl::col(format!(
453 +                         "_qsv-{}-lower",
454 +                         col.to_string()
455 +                             .trim_start_matches(r#"col(""#)
456 +                             .trim_end_matches(r#"")"#)
457 ~                     ))
    |
  • Loading branch information
jqnatividad committed Nov 14, 2024
1 parent 98e3659 commit 02cd5a9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/cmd/joinp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ impl JoinStruct {
for col in &left_selcols {
self.left_lf = self
.left_lf
.with_column(col.clone().str().to_lowercase().alias(&format!(
.with_column(col.clone().str().to_lowercase().alias(format!(
"_qsv-{}-lower",
col.to_string()
.trim_start_matches(r#"col(""#)
Expand All @@ -425,7 +425,7 @@ impl JoinStruct {
for col in &right_selcols {
self.right_lf = self
.right_lf
.with_column(col.clone().str().to_lowercase().alias(&format!(
.with_column(col.clone().str().to_lowercase().alias(format!(
"_qsv-{}-lower",
col.to_string()
.trim_start_matches(r#"col(""#)
Expand All @@ -437,7 +437,7 @@ impl JoinStruct {
let left_selcols_w: Vec<_> = left_selcols
.iter()
.map(|col| {
polars::lazy::dsl::col(&format!(
polars::lazy::dsl::col(format!(
"_qsv-{}-lower",
col.to_string()
.trim_start_matches(r#"col(""#)
Expand All @@ -449,7 +449,7 @@ impl JoinStruct {
let right_selcols_w: Vec<_> = right_selcols
.iter()
.map(|col| {
polars::lazy::dsl::col(&format!(
polars::lazy::dsl::col(format!(
"_qsv-{}-lower",
col.to_string()
.trim_start_matches(r#"col(""#)
Expand Down

0 comments on commit 02cd5a9

Please sign in to comment.