Skip to content
This repository was archived by the owner on Apr 6, 2021. It is now read-only.

Commit 8c9c450

Browse files
1 parent f2ed57f commit 8c9c450

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

grains/src/lib.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
pub fn square(n: u32) -> u64 {
2-
// Pending RFC 1303 or RFC 1434
3-
if !(1 <= n && n <= 64) {
2+
if !((1..=64).contains(&n)) {
43
panic!("Square must be between 1 and 64");
54
}
65

0 commit comments

Comments
 (0)