mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-18 08:32: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 {
|
||||
// TODO: reject. You can only refine numeric types.
|
||||
}
|
||||
if name := n.Name().Key(); name == t.KeyBool || name == t.KeyStatus ||
|
||||
name == t.KeyReader1 || name == t.KeyWriter1 {
|
||||
break
|
||||
switch n.Name().Key() {
|
||||
case t.KeyBool, t.KeyStatus, t.KeyReader1, t.KeyWriter1:
|
||||
break swtch
|
||||
}
|
||||
for _, s := range q.c.structs {
|
||||
if s.ID == n.Name() {
|
||||
|
||||
Reference in new issue
Block a user