You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Output of cargo clippy --fix --bin "debug-viewer-rs" command:
Checking debug-viewer-rs v0.1.0 (/home/cosmin/Work/debug-viewer-rs)
warning: failed to automatically apply fixes suggested by rustc to crate `debug_viewer_rs`
after fixes were automatically applied the compiler reported errors within these files:
* src/main.rs
This likely indicates a bug in either rustc or cargo itself,
and we would appreciate a bug report! You're likely to see
a number of compiler warnings after this message which cargo
attempted to fix but failed. If you could open an issue at
https://github.com/rust-lang/rust-clippy/issues
quoting the full output of this command we'd be very appreciative!
Note that you may be able to make some more progress in the near-term
fixing code with the `--broken-code` flag
The following errors were reported:
error[E0505]: cannot move out of `entry` because it is borrowed
--> src/main.rs:26:58
|
23 | let entry = entry?;
| ----- binding `entry` declared here
24 | match entry.path()?.to_str() {
| ----- borrow of `entry` occurs here
25 | Some(entry_path) => {
26 | process_entry(entry_path, BufReader::new(entry))?;
| ------------- borrow later used by call ^^^^^ move out of `entry` occurs here
error: aborting due to previous error
For more information about this error, try `rustc --explain E0505`.
Original diagnostics will follow.
warning: unnecessary use of `to_string`
--> src/main.rs:26:31
|
26 | process_entry(&entry_path.to_string(), BufReader::new(entry))?;
| ^^^^^^^^^^^^^^^^^^^^^^^ help: use: `entry_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: `debug-viewer-rs` (bin "debug-viewer-rs") generated 1 warning (run `cargo clippy --fix --bin "debug-viewer-rs"` to apply 1 suggestion)
Finished dev [unoptimized + debuginfo] target(s) in 0.22s
[package]
name = "debug-viewer-rs"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
anyhow = "1.0.75"
flate2 = { version = "1.0.28", features = ["zlib-ng"], default-features = false }
tar = "0.4.40"
Summary
Output of
cargo clippy --fix --bin "debug-viewer-rs"
command:Reproducer
This is the code in
src/main.rs
:My
Cargo.toml
file is:Version
Additional Labels
No response
The text was updated successfully, but these errors were encountered: