This website requires JavaScript.
Explore
Help
Sign In
Mirrors
/
rust-clippy
Watch
2
Star
0
Fork
You've already forked rust-clippy
0
mirror of
https://github.com/rust-lang/rust-clippy
synced
2024-11-24 13:43:17 +00:00
Code
Issues
Projects
Releases
Packages
Wiki
Activity
1bf74fc303
rust-clippy
/
tests
/
ui
/
obfuscated_if_else.fixed
8 lines
102 B
Rust
Raw
Normal View
History
Unescape
Escape
Update to a compiletest-rs version that requires `//@` for commands
2023-04-20 14:37:15 +00:00
//@run-rustfix
Add new lint `obfuscated_if_else` New lint suggests using `if .. else ..` instead of `.then_some(..).unwrap_or(..)`.
2022-07-10 21:37:38 +00:00
#![
warn(clippy::obfuscated_if_else)
]
fn
main
(
)
{
if
true
{
"
a
"
}
else
{
"
b
"
}
;
}
Reference in a new issue
Copy permalink