~ruther/simple-clock

b92738752d8b6cc66a2b634b6528a7f5d3f2a315 — František Boháček 1 year, 8 months ago 2efb21b
feat(src): add meaningful message to panic in Calendar::days_in_month
1 files changed, 1 insertions(+), 1 deletions(-)

M source/src/calendar.rs
M source/src/calendar.rs => source/src/calendar.rs +1 -1
@@ 246,7 246,7 @@ impl Calendar {
            2 => 28,
            1 | 3 | 5 | 7 | 8 | 10 | 12 => 31,
            4 | 6 | 9 | 11 => 30,
            _ => panic!(),
            _ => panic!("Month {month} does not exist, cannot get days in that month."),
        }
    }


Do not follow this link