mirror of
https://codeberg.org/ziglang/zig.git
synced 2026-04-26 13:01:34 +03:00
removed reduntant @as() from switch in getDaysInMonth
This commit is contained in:
committed by
Andrew Kelley
parent
d0b39c7f2b
commit
076f7e5bd5
@@ -89,10 +89,10 @@ pub const Month = enum(u4) {
|
||||
pub fn getDaysInMonth(year: Year, month: Month) u5 {
|
||||
return switch (month) {
|
||||
.jan => 31,
|
||||
.feb => @as(u5, switch (isLeapYear(year)) {
|
||||
.feb => switch (isLeapYear(year)) {
|
||||
true => 29,
|
||||
false => 28,
|
||||
}),
|
||||
},
|
||||
.mar => 31,
|
||||
.apr => 30,
|
||||
.may => 31,
|
||||
|
||||
Reference in New Issue
Block a user