diff options
author | Alex Auvolat <alex@adnab.me> | 2022-09-02 17:24:26 +0200 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2022-09-02 17:24:26 +0200 |
commit | e1751c8a9cb2a0d91b5aed636ee72ca4fa31ca68 (patch) | |
tree | c77f5299ac72bcb69c3832022fd3c05140489f7a /src/block | |
parent | 5d4b937a00882b9bf8b36f7430f3d1fe9db58903 (diff) | |
download | garage-e1751c8a9cb2a0d91b5aed636ee72ca4fa31ca68.tar.gz garage-e1751c8a9cb2a0d91b5aed636ee72ca4fa31ca68.zip |
fix clippyresync-ajustable-speed
Diffstat (limited to 'src/block')
-rw-r--r-- | src/block/resync.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/block/resync.rs b/src/block/resync.rs index 0f358d48..39e4d50f 100644 --- a/src/block/resync.rs +++ b/src/block/resync.rs @@ -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 |