-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
C-bugCategory: Clippy is not doing the correct thingCategory: Clippy is not doing the correct thingI-false-positiveIssue: The lint was triggered on code it shouldn't haveIssue: The lint was triggered on code it shouldn't haveT-middleType: Probably requires verifiying typesType: Probably requires verifiying types
Description
Summary
warning: unnecessary use of `to_string`
--> language-servers/ls_installer/src/java/tests.rs:165:9
|
165 | locations[0].uri.to_string().split('?').next().unwrap(),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `locations[0].uri.split('?')`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned
= note: `#[warn(clippy::unnecessary_to_owned)]` on by default
but uri does not have a split method
Lint Name
clippy::unnecessary_to_owned
Reproducer
No response
Version
cargo +nightly --version
cargo 1.77.0-nightly (ac6bbb332 2023-12-26)
Additional Labels
No response
Metadata
Metadata
Assignees
Labels
C-bugCategory: Clippy is not doing the correct thingCategory: Clippy is not doing the correct thingI-false-positiveIssue: The lint was triggered on code it shouldn't haveIssue: The lint was triggered on code it shouldn't haveT-middleType: Probably requires verifiying typesType: Probably requires verifiying types