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:
Gwen Lg
2025-12-13 20:31:05 +01:00
parent 141b3f24f1
commit ea9597819c
5 changed files with 7 additions and 7 deletions
+1 -1
View File
@@ -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<_>>(),