Skip to content

Commit

Permalink
clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
wasm-forge committed Dec 26, 2024
1 parent 64f0966 commit 2c91268
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/runtime/structure_helpers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ use crate::{
Storage,
},
};

use std::collections::BTreeMap;
#[derive(Debug)]
struct EntryFindResult {
Expand Down Expand Up @@ -429,7 +430,7 @@ pub fn rm_dir_entry(

#[inline]
pub fn grow_memory(memory: &dyn Memory, max_address: FileSize) {
let pages_required = (max_address + WASM_PAGE_SIZE_IN_BYTES - 1) / WASM_PAGE_SIZE_IN_BYTES;
let pages_required = max_address.div_ceil(WASM_PAGE_SIZE_IN_BYTES);

let cur_pages = memory.size();

Expand Down
2 changes: 1 addition & 1 deletion src/storage/chunk_iterator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ impl<'a, M: Memory> ChunkV2Iterator<'a, M> {
}
}

impl<'a, M: Memory> Iterator for ChunkV2Iterator<'a, M> {
impl<M: Memory> Iterator for ChunkV2Iterator<'_, M> {
type Item = ((Node, FileChunkIndex), CachedChunkPtr);

fn next(&mut self) -> Option<Self::Item> {
Expand Down
1 change: 1 addition & 0 deletions src/storage/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ pub struct FileMetadata {
pub node: Node,
pub size: FileSize,
pub times: Times,
pub file_type: FileType,
}

impl ic_stable_structures::Storable for Metadata {
Expand Down

0 comments on commit 2c91268

Please sign in to comment.