diff options
Diffstat (limited to 'bin/tests/snapshots/main__useless_has_attr.snap')
-rw-r--r-- | bin/tests/snapshots/main__useless_has_attr.snap | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/bin/tests/snapshots/main__useless_has_attr.snap b/bin/tests/snapshots/main__useless_has_attr.snap new file mode 100644 index 0000000..df72eaf --- /dev/null +++ b/bin/tests/snapshots/main__useless_has_attr.snap | |||
@@ -0,0 +1,34 @@ | |||
1 | --- | ||
2 | source: bin/tests/main.rs | ||
3 | expression: "&out" | ||
4 | |||
5 | --- | ||
6 | [W19] Warning: This `if` expression can be simplified with `or` | ||
7 | ╭─[data/useless_has_attr.nix:3:4] | ||
8 | │ | ||
9 | 3 │ (if x ? a then x.a else default) | ||
10 | · ───────────────┬────────────── | ||
11 | · ╰──────────────── Consider using x.a or default instead of this if expression | ||
12 | ───╯ | ||
13 | [W19] Warning: This `if` expression can be simplified with `or` | ||
14 | ╭─[data/useless_has_attr.nix:4:4] | ||
15 | │ | ||
16 | 4 │ (if x.a ? b then x.a.b else default) | ||
17 | · ─────────────────┬──────────────── | ||
18 | · ╰────────────────── Consider using x.a.b or default instead of this if expression | ||
19 | ───╯ | ||
20 | [W19] Warning: This `if` expression can be simplified with `or` | ||
21 | ╭─[data/useless_has_attr.nix:5:4] | ||
22 | │ | ||
23 | 5 │ (if x ? a.b then x.a.b else default) | ||
24 | · ─────────────────┬──────────────── | ||
25 | · ╰────────────────── Consider using x.a.b or default instead of this if expression | ||
26 | ───╯ | ||
27 | [W19] Warning: This `if` expression can be simplified with `or` | ||
28 | ╭─[data/useless_has_attr.nix:8:4] | ||
29 | │ | ||
30 | 8 │ (if x ? a then x.a else if b then c else d) | ||
31 | · ────────────────────┬──────────────────── | ||
32 | · ╰────────────────────── Consider using x.a or (if b then c else d) instead of this if expression | ||
33 | ───╯ | ||
34 | |||