CI check for Clippy
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2023-01-06 14:25:29 +01:00
parent 1d66e08d48
commit ebc1565429
5 changed files with 21 additions and 7 deletions

View File

@@ -78,7 +78,7 @@ mod tests {
random.expect_get_between().returning_st(|low, high| {
assert_eq!(1, low);
assert_eq!(6, high);
return 1;
1
});
Rc::new(random)
});
@@ -89,7 +89,7 @@ mod tests {
.returning(|stat, amount, self_inflicted| {
assert_eq!(Statistic::Attack, stat);
assert_eq!(2, amount);
assert_eq!(false, self_inflicted);
assert!(!self_inflicted);
true
});

View File

@@ -64,7 +64,7 @@ mod tests {
target
.expect_battle()
.once()
.return_once_st(move || Some(battle.clone()));
.return_once_st(move || Some(battle));
let target = Rc::new(target);
let script = AfterYou::new();

View File

@@ -52,7 +52,7 @@ impl Script for Assist {
let party = battle.find_party_for_pokemon(&user).unwrap().party();
let possible_moves = Self::get_party_moves(&party, &user);
if possible_moves.len() == 0 {
if possible_moves.is_empty() {
choice.fail();
return;
}