aboutsummaryrefslogtreecommitdiff
path: root/bin/tests/snapshots/main__useless_has_attr.snap
blob: df72eaf7a0bb127925d82490de23dbf15b6f5f87 (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
---
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
───╯