Bas Broek
a095decbc2
Prefer if case over switch
...
Motivation:
There are quite a few `switch`es that cover just two cases. Explicitly state this via an `if case` + `else` structure.
Modifications:
Changes something like:
switch a {
case .b:
return c
default:
return d
}
to
if case .b = a {
return c
} else {
return d
}
Result:
This should prevent misinterpretation and thus potential bugs in the future.
2018-03-19 14:45:32 +01:00
..
2018-02-08 11:21:55 +00:00
2018-03-12 22:04:47 +01:00
2018-03-02 15:40:52 +09:00
2018-03-16 14:42:24 +01:00
2018-03-11 22:47:29 +09:00
2018-03-15 22:11:46 +09:00
2018-03-05 19:01:10 +09:00
2018-03-19 14:43:38 +01:00
2018-03-15 22:11:46 +09:00
2018-03-15 21:23:19 +01:00
2018-03-02 15:40:52 +09:00
2018-03-02 15:40:52 +09:00
2018-03-19 14:43:55 +01:00
2018-03-02 15:40:52 +09:00
2018-03-15 22:11:46 +09:00
2018-02-08 13:12:30 +00:00
2018-02-26 15:52:49 +00:00
2018-03-19 20:41:35 +09:00
2018-03-19 19:53:41 +09:00
2018-03-19 14:44:08 +01:00
2018-03-02 15:40:52 +09:00
2018-03-12 13:27:42 +01:00
2018-03-02 15:40:52 +09:00
2018-02-12 15:09:22 +00:00
2018-03-19 14:45:32 +01:00
2018-03-03 09:04:57 +09:00
2018-03-19 14:43:38 +01:00
2018-03-19 14:43:38 +01:00
2018-03-12 20:12:20 +01:00
2018-03-02 15:40:52 +09:00
2018-02-26 09:49:43 +00:00
2018-03-02 15:40:52 +09:00
2018-03-19 14:43:38 +01:00
2018-03-15 22:11:46 +09:00
2018-03-19 14:43:55 +01:00
2018-03-02 15:40:52 +09:00
2018-03-02 15:40:52 +09:00
2018-02-28 09:46:29 +00:00
2018-03-15 18:53:45 +01:00
2018-03-13 15:09:13 +00:00
2018-03-16 10:10:50 +01:00
2018-03-19 14:43:38 +01:00
2018-03-19 14:43:38 +01:00
2018-03-19 14:45:32 +01:00
2018-03-06 00:32:05 +09:00
2018-03-03 10:16:39 +09:00
2018-03-16 23:53:16 +09:00