Skip to content

Commit

Permalink
clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
wasm-forge committed Aug 29, 2024
1 parent 2c1cf05 commit 677aa32
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
5 changes: 2 additions & 3 deletions src/storage/allocator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -137,10 +137,9 @@ impl<M: Memory> ChunkPtrAllocator<M> {
pub fn set_chunk_size(&mut self, new_size: usize) -> Result<(), Error> {
// new size must be one of the available values

if ChunkSize::VALUES
if !ChunkSize::VALUES
.iter()
.find(|size| **size as usize == new_size)
.is_none()
.any(|size| *size as usize == new_size)
{
return Err(Error::IncompatibleChunkSize);
}
Expand Down
15 changes: 7 additions & 8 deletions src/test_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,13 @@ pub fn test_fs_transient() -> FileSystem {
pub fn test_fs_setups(virtual_file_name: &str) -> Vec<FileSystem> {
use crate::runtime::types::ChunkSize;

let mut result = Vec::new();

result.push(test_fs());
result.push(test_fs_v1());
result.push(test_fs_custom_chunk_size(ChunkSize::CHUNK4K));
result.push(test_fs_custom_chunk_size(ChunkSize::CHUNK64K));

result.push(test_fs_transient());
let mut result = vec![
test_fs(),
test_fs_v1(),
test_fs_custom_chunk_size(ChunkSize::CHUNK4K),
test_fs_custom_chunk_size(ChunkSize::CHUNK64K),
test_fs_transient(),
];

if !virtual_file_name.is_empty() {
let mut fs = test_fs();
Expand Down

0 comments on commit 677aa32

Please sign in to comment.