Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

redundant .clone() call on read_sketch_file #4

Closed
stephenturner opened this issue Dec 7, 2023 · 1 comment
Closed

redundant .clone() call on read_sketch_file #4

stephenturner opened this issue Dec 7, 2023 · 1 comment

Comments

@stephenturner
Copy link

Hello! Working on getting a Docker image built over in StaPH-B/docker-builds#816 and noticed this during compilation:

#10 50.29    Compiling sylph v0.4.1 (/sylph-0.4.1)
#10 50.84 warning: call to `.clone()` on a reference in this situation does nothing
#10 50.84    --> src/contain.rs:485:47
#10 50.84     |
#10 50.84 485 |         let file = File::open(read_sketch_file.clone()).expect(&format!(
#10 50.84     |                                               ^^^^^^^^ help: remove this redundant call
#10 50.84     |
#10 50.84     = note: the type `str` does not implement `Clone`, so calling `clone` on `&str` copies the reference, which does not do anything and can be removed
#10 50.84     = note: `#[warn(noop_method_call)]` on by default

Is this something we need to be concerned with? cc @erinyoung

@bluenote-1577
Copy link
Owner

Hi @stephenturner,

Thanks for bringing this up. This is not a big deal but I should fix it at some point... just a compiler warning.

I'll leave this up til I fix it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants