nightly fails in CI because of clippy::needless_borrow
For example,
warning: this expression borrows a value the compiler would automatically borrow
--> crates/tor-persist/src/fs.rs:152:36
|
152 | std::fs::write(&fname_tmp, (&output).as_bytes())?;
| ^^^^^^^^^ help: change this to: `output`
|
warning: this expression borrows a value the compiler would automatically borrow
--> crates/tor-llcrypto/src/pk/ed25519.rs:78:9
|
78 | (&pk).into()
| ^^^^^ help: change this to: `pk`
|
Some of these are correct. For example, it seems to me that the first case could be just write(&.., &output)
.
Others are not; for example, taking the compiler's suggestion for the second one results in a compile error. This seems to be a bug in nightly, which I have just filed: https://github.com/rust-lang/rust/issues/93509