Skip to content

Commit

Permalink
Appease clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
p-offtermatt committed Aug 13, 2024
1 parent b9ad3fe commit d065293
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
5 changes: 2 additions & 3 deletions contracts/hydro/src/lsm_integration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,15 @@ pub fn get_validators_for_round(deps: Deps, round_id: u64) -> StdResult<Vec<Stri
}

// get the validators for the previous round
let validators = VALIDATORS_PER_ROUND
VALIDATORS_PER_ROUND
.load(deps.storage, round_id - 1)
.map_err(|_| {
StdError::generic_err(format!(
"Failed to load validators for rounds {} and {}",
round_id,
round_id - 1
))
})?;
validators
})?
}
};

Expand Down
6 changes: 4 additions & 2 deletions contracts/hydro/src/testing_lsm_integration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,12 @@ fn get_default_constants() -> crate::state::Constants {

#[test]
fn test_validate_denom() {
type SetupFunc = dyn Fn(&mut dyn Storage, &mut Env);

struct TestCase {
denom: String,
expected_result: Result<String, StdError>,
setup: Box<dyn Fn(&mut dyn Storage, &mut Env)>,
setup: Box<SetupFunc>,
}

let test_cases = vec![
Expand Down Expand Up @@ -181,7 +183,7 @@ fn lock_tokens_with_multiple_denoms() {
"for test case {}, expected error message to contain '{}', got '{}'",
case.description,
msg,
res.as_ref().err().unwrap().to_string(),
res.as_ref().err().unwrap(),
),
}
}
Expand Down

0 comments on commit d065293

Please sign in to comment.