Skip to content

Latest nightly issue #12068

@amircodota

Description

@amircodota

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 thingI-false-positiveIssue: The lint was triggered on code it shouldn't haveT-middleType: Probably requires verifiying types

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions