Lints and suggestions for the Nix programming language
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

refactor(bool_comparison): inline a single-used binding

Co-authored-by: x10an14 <x10an14@users.noreply.github.com>

+5 -5
+5 -5
lib/src/lints/bool_comparison.rs
··· 83 83 } 84 84 } 85 85 }; 86 - let message = format!("Comparing `{non_bool_side}` with boolean literal `{bool_side}`"); 87 86 let at = node.text_range(); 88 - Some( 89 - self.report() 90 - .suggest(at, message, Suggestion::new(at, replacement)), 91 - ) 87 + Some(self.report().suggest( 88 + at, 89 + format!("Comparing `{non_bool_side}` with boolean literal `{bool_side}`"), 90 + Suggestion::new(at, replacement), 91 + )) 92 92 } 93 93 } 94 94