Skip to content

Commit 88fb6d0

Browse files
committed
Fixed according to cargo clippy warnings
1 parent 3ecd3a7 commit 88fb6d0

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/math.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ use crate::internal_math;
22

33
use std::mem::swap;
44

5+
#[allow(clippy::many_single_char_names)]
56
pub fn pow_mod(x: i64, mut n: i64, m: u32) -> u32 {
67
assert!(0 <= n && 1 <= m);
78

@@ -25,7 +26,7 @@ pub fn inv_mod(x: i64, m: i64) -> i64 {
2526
z.1
2627
}
2728

28-
pub fn crt(r: &Vec<i64>, m: &Vec<i64>) -> (i64, i64) {
29+
pub fn crt(r: &[i64], m: &[i64]) -> (i64, i64) {
2930
assert!(r.len() == m.len());
3031
// Contracts: 0 <= r0 < m0
3132
let (mut r0, mut m0) = (0, 1);
@@ -94,5 +95,5 @@ pub fn floor_sum(n: i64, m: i64, mut a: i64, mut b: i64) -> i64 {
9495
}
9596
ans += (n - (x_max + a - 1) / a) * y_max;
9697
ans += floor_sum(y_max, a, m, (a - x_max % a) % a);
97-
return ans;
98+
ans
9899
}

0 commit comments

Comments
 (0)