From e8130a90dca048d195603281f72e1af0b4f7ccc6 Mon Sep 17 00:00:00 2001 From: Akshay Date: Sun, 20 Feb 2022 09:37:32 +0530 Subject: new lint: bool_simplification TODO: add more patterns to this --- bin/tests/snapshots/main__bool_simplification.snap | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 bin/tests/snapshots/main__bool_simplification.snap (limited to 'bin/tests/snapshots/main__bool_simplification.snap') diff --git a/bin/tests/snapshots/main__bool_simplification.snap b/bin/tests/snapshots/main__bool_simplification.snap new file mode 100644 index 0000000..9e3c991 --- /dev/null +++ b/bin/tests/snapshots/main__bool_simplification.snap @@ -0,0 +1,13 @@ +--- +source: bin/tests/main.rs +expression: "&out" + +--- +[W18] Warning: This boolean expression can be simplified + ╭─[data/bool_simplification.nix:2:7] + │ + 2 │ _ = !(a == b); + · ────┬──── + · ╰────── Try != instead of !(... == ...) +───╯ + -- cgit v1.2.3