diff --git a/src/main.rs b/src/main.rs index 1788b81..32a5ca3 100644 --- a/src/main.rs +++ b/src/main.rs @@ -4,14 +4,14 @@ #![allow(clippy::match_overlapping_arm)] #![allow(clippy::new_without_default)] +use std::io::Write; + pub mod solutions; pub mod utils; #[cfg(test)] mod tests; -use std::io::Write; - /// Execute the solution (if available) of the specified problem. Also measure /// its running time. /// diff --git a/src/solutions/distinct_powers.rs b/src/solutions/distinct_powers.rs index e89aecc..600cc73 100644 --- a/src/solutions/distinct_powers.rs +++ b/src/solutions/distinct_powers.rs @@ -8,7 +8,7 @@ use crate::utils; /// * `primes` - Prime numbers to use to calculate the exponent. /// /// -> Exponent. -fn exponent(mut num: i64, primes: &Vec) -> i64 { +fn exponent(mut num: i64, primes: &[i64]) -> i64 { // Calculate the greatest exponent of every prime in the given number. let mut exponents = vec![0i64; primes.len()]; let mut gcd = 0;