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

Apply select clippy perf lints #374

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

jqnatividad
Copy link

by running

cargo +nightly clippy -- -W clippy::perf

warning: useless conversion to the same type: `&str`
   --> src/deserializer.rs:428:58
    |
428 |         self.next_field().and_then(|f| visitor.visit_str(f.into()))
    |                                                          ^^^^^^^^ help: consider removing `.into()`: `f`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
    = note: `#[warn(clippy::useless_conversion)]` on by default
warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator`
   --> src/string_record.rs:667:33
    |
667 |         StringRecord::from_iter(xs.into_iter())
    |                                 ^^^^^^^^^^^^^^ help: consider removing the `.into_iter()`: `xs`
    |
note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()`
   --> /rustc/13a52890dde8cfeb95069d77c223ac37c0cf3a46/library/core/src/iter/traits/collect.rs:152:21
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
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

Successfully merging this pull request may close these issues.

1 participant