#![warn(clippy::nonminimal_bool)]
macro_rules! blocky {
- () => {{
- true
- }};
+ () => {{ true }};
}
macro_rules! blocky_too {
}
fn condition_has_block_with_single_expression() -> i32 {
- if true {
- 6
- } else {
- 10
- }
+ if true { 6 } else { 10 }
}
fn condition_is_normal() -> i32 {
let x = 3;
- if x == 3 {
- 6
- } else {
- 10
- }
+ if x == 3 { 6 } else { 10 }
}
fn condition_is_unsafe_block() {
fn block_in_assert() {
let opt = Some(42);
- assert!(opt
- .as_ref()
- .map(|val| {
- let mut v = val * 2;
- v -= 1;
- v * 3
- })
- .is_some());
+ assert!(
+ opt.as_ref()
+ .map(|val| {
+ let mut v = val * 2;
+ v -= 1;
+ v * 3
+ })
+ .is_some()
+ );
}
fn main() {}