mirror of
https://github.com/deuxfleurs-org/garage.git
synced 2026-08-12 15:26:52 +00:00
refactor: clean perf related
- use array instead of vec when it's useless clippy lint message: useless use of `vec!` help: you can use an array directly. help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#useless_vec - call as_bytes before slicing lint message: calling `as_bytes` after slicing a string help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#sliced_string_as_bytes Signed-off-by: Gwen Lg <me@gwenlg.fr>
This commit is contained in:
@@ -173,7 +173,7 @@ impl BlockManager {
|
||||
data_fsync: config.data_fsync,
|
||||
disable_scrub: config.disable_scrub,
|
||||
compression_level: config.compression_level,
|
||||
mutation_lock: vec![(); MUTEX_COUNT]
|
||||
mutation_lock: [(); MUTEX_COUNT]
|
||||
.iter()
|
||||
.map(|_| Mutex::new(BlockManagerLocked()))
|
||||
.collect::<Vec<_>>(),
|
||||
|
||||
Reference in New Issue
Block a user