diff options
author | Joris | 2023-04-17 21:10:48 +0200 |
---|---|---|
committer | Joris | 2023-04-17 21:10:48 +0200 |
commit | 459016e70dd4933a8082d27748097de81a3e53ff (patch) | |
tree | 0ed14ecc8762d62a55bf8c05356bcc984b1a0cea /src/payer.rs | |
parent | 3932daa26360d6e03807381d0b8ffa2d0e704847 (diff) |
Follow clippy indications
Diffstat (limited to 'src/payer.rs')
-rw-r--r-- | src/payer.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/payer.rs b/src/payer.rs index 48cee52..0cc8016 100644 --- a/src/payer.rs +++ b/src/payer.rs @@ -3,11 +3,11 @@ use std::collections::HashMap; use crate::model::user::User; pub fn exceeding( - users: &Vec<User>, + users: &[User], user_incomes: &HashMap<i64, i64>, user_payments: &HashMap<i64, i64>, ) -> Vec<(String, i64)> { - let ratios = users.into_iter().map(|u| { + let ratios = users.iter().map(|u| { let income = *user_incomes.get(&u.id).unwrap_or(&0); if income == 0 { (u.name.clone(), 0, 0.0) |