Skip to content

Commit 5fb310b

Browse files
authored
1 parent c1010bb commit 5fb310b

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
pub fn is_leap_year(year: u64) -> bool {
2-
let has_factor = |n| year % n == 0;
3-
has_factor(4) && (!has_factor(100) || has_factor(400))
2+
year.is_multiple_of(4) && (!year.is_multiple_of(100) || year.is_multiple_of(400))
43
}

0 commit comments

Comments
 (0)