mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-25 16:55:11 +01:00
Refactor an if to be a switch.
This commit is contained in:
1 parent
6f132a74e2
commit
98378dda39
1 file changed
+3
-3
+3
-3
@@ -955,9 +955,9 @@ swtch:
|
|||||||
if n.Min() != nil || n.Max() != nil {
|
if n.Min() != nil || n.Max() != nil {
|
||||||
// TODO: reject. You can only refine numeric types.
|
// TODO: reject. You can only refine numeric types.
|
||||||
}
|
}
|
||||||
if name := n.Name().Key(); name == t.KeyBool || name == t.KeyStatus ||
|
switch n.Name().Key() {
|
||||||
name == t.KeyReader1 || name == t.KeyWriter1 {
|
case t.KeyBool, t.KeyStatus, t.KeyReader1, t.KeyWriter1:
|
||||||
break
|
break swtch
|
||||||
}
|
}
|
||||||
for _, s := range q.c.structs {
|
for _, s := range q.c.structs {
|
||||||
if s.ID == n.Name() {
|
if s.ID == n.Name() {
|
||||||
|
|||||||
Reference in new issue
Block a user