fix clippy
continuous-integration/drone/pr Build is passing Details
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Alex 2022-09-02 17:24:26 +02:00
parent 5d4b937a00
commit e1751c8a9c
Signed by: lx
GPG Key ID: 0E496D15096376BE
1 changed files with 2 additions and 2 deletions

View File

@ -311,7 +311,7 @@ impl BlockResyncManager {
}));
}
}
return Ok(None);
Ok(None)
}
async fn resync_block(&self, manager: &BlockManager, hash: &Hash) -> Result<(), Error> {
@ -432,7 +432,7 @@ impl BlockResyncManager {
}
pub async fn set_n_workers(&self, n_workers: usize) -> Result<(), Error> {
if n_workers < 1 || n_workers > MAX_RESYNC_WORKERS {
if !(1..=MAX_RESYNC_WORKERS).contains(&n_workers) {
return Err(Error::Message(format!(
"Invalid number of resync workers, must be between 1 and {}",
MAX_RESYNC_WORKERS