aboutsummaryrefslogtreecommitdiff
path: root/bin/tests/snapshots/main__useless_has_attr.snap
blob: d9b5ac895e4316484d93dedc75be8b3ea8b26b09 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
---
source: bin/tests/main.rs
expression: "&out"

---
[W19] Warning: This `if` expression can be simplified with `or`
   ╭─[data/useless_has_attr.nix:3:4]
   │
 3 │   (if x ? a then x.a else default)
   ·    ───────────────┬──────────────  
   ·                   ╰──────────────── Consider using x.a or default instead of this if expression
───╯
[W19] Warning: This `if` expression can be simplified with `or`
   ╭─[data/useless_has_attr.nix:4:4]
   │
 4 │   (if x.a ? b then x.a.b else default)
   ·    ─────────────────┬────────────────  
   ·                     ╰────────────────── Consider using x.a.b or default instead of this if expression
───╯
[W19] Warning: This `if` expression can be simplified with `or`
   ╭─[data/useless_has_attr.nix:5:4]
   │
 5 │   (if x ? a.b then x.a.b else default)
   ·    ─────────────────┬────────────────  
   ·                     ╰────────────────── Consider using x.a.b or default instead of this if expression
───╯
[W19] Warning: This `if` expression can be simplified with `or`
   ╭─[data/useless_has_attr.nix:8:4]
   │
 8 │   (if x ? a then x.a else if b then c else d)
   ·    ────────────────────┬────────────────────  
   ·                        ╰────────────────────── Consider using x.a or (if b then c else d) instead of this if expression
───╯
[W19] Warning: This `if` expression can be simplified with `or`
   ╭─[data/useless_has_attr.nix:9:4]
   │
 9 │   (if x ? a then x.a else b.c)
   ·    ─────────────┬────────────  
   ·                 ╰────────────── Consider using x.a or b.c instead of this if expression
───╯