Open
Description
Lint name: clippy::useless_conversion
Using rocket = "=0.5.0-rc.1"
crate, I tried this code:
#[derive(rocket::FromForm)]
struct F {
#[field(default = true)]
f: bool,
}
fn main() {
println!("Hello, world!");
}
I expected to see this happen: no warning about 'useless conversion to the same type: `bool`'
Instead, this happened:
warning: useless conversion to the same type: `bool`
--> src/main.rs:3:23
|
3 | #[field(default = true)]
| ^^^^ help: consider removing `.into()`: `true`
|
= note: `#[warn(clippy::useless_conversion)]` on by default
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
Meta
Rust version (rustc -Vv
):
rustc 1.55.0 (c8dfcfe04 2021-09-06)
binary: rustc
commit-hash: c8dfcfe046a7680554bf4eb612bad840e7631c4b
commit-date: 2021-09-06
host: x86_64-unknown-linux-gnu
release: 1.55.0
LLVM version: 12.0.1