removed reduntant @as() from switch in getDaysInMonth

This commit is contained in:
bgthompson
2026-01-31 22:44:21 +10:00
committed by Andrew Kelley
parent d0b39c7f2b
commit 076f7e5bd5
+2 -2
View File
@@ -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,