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

sniff: can now sniff snappy-compressed files - on the local file system and on URLs #925

Merged
merged 5 commits into from
Apr 14, 2023

Conversation

jqnatividad
Copy link
Owner

No description provided.

warning: this argument is passed by value, but not consumed in the function body
   --> src/cmd/sniff.rs:512:33
    |
512 | fn decompress_snappy_file(path: String, tmpdir: &self_update::TempDir) -> Result<String, CliError> {
    |                                 ^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_value
    = note: `-W clippy::needless-pass-by-value` implied by `-W clippy::pedantic`
help: consider changing the type to
    |
512 | fn decompress_snappy_file(path: &str, tmpdir: &self_update::TempDir) -> Result<String, CliError> {
    |                                 ~~~~
help: change `path.clone()` to
    |
513 |     let mut snappy_file = std::fs::File::open(path.to_string())?;
warning: unnecessary use of `to_string`
   --> src/cmd/sniff.rs:512:47
    |
512 |     let mut snappy_file = std::fs::File::open(path.to_string())?;
    |                                               ^^^^^^^^^^^^^^^^ help: use: `path`
    |
    = 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

warning: deref on an immutable reference
   --> src/cmd/sniff.rs:514:31
    |
514 |     let file_stem = Path::new(&*path).file_stem().unwrap().to_str().unwrap();
    |                               ^^^^^^ help: if you would like to reborrow, try removing `&*`: `path`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref
    = note: `#[warn(clippy::borrow_deref_ref)]` on by default
@jqnatividad jqnatividad merged commit 7e0ec1f into master Apr 14, 2023
@jqnatividad jqnatividad deleted the sniff_sz_files branch April 14, 2023 23:54
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.

None yet

1 participant