Skip to content

Commit 3a4ee5b

Browse files
fix: fix review
1 parent 8329248 commit 3a4ee5b

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

storage/src/checker/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -618,6 +618,7 @@ fn update_progress_bar(progress_bar: Option<&ProgressBar>, range_set: &LinearAdd
618618
#[cfg(test)]
619619
mod test {
620620
#![expect(clippy::unwrap_used)]
621+
#![expect(clippy::indexing_slicing)]
621622

622623
use nonzero_ext::nonzero;
623624

storage/src/checker/range_set.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -236,8 +236,7 @@ pub struct LinearAddressRangeSet {
236236

237237
#[expect(clippy::result_large_err)]
238238
impl LinearAddressRangeSet {
239-
const NODE_STORE_START_ADDR: LinearAddress =
240-
LinearAddress::new(NodeStoreHeader::SIZE).expect("NodeStoreHeader::SIZE is non-zero");
239+
const NODE_STORE_START_ADDR: LinearAddress = LinearAddress::new(NodeStoreHeader::SIZE).unwrap();
241240

242241
pub(super) fn new(db_size: u64) -> Result<Self, CheckerError> {
243242
if db_size < NodeStoreHeader::SIZE {

storage/src/nodestore/alloc.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -370,6 +370,7 @@ impl<S: WritableStorage> NodeAllocator<'_, S> {
370370
/// # Errors
371371
///
372372
/// Returns a [`FileIoError`] if the area cannot be read or written.
373+
#[expect(clippy::indexing_slicing)]
373374
pub fn delete_node(&mut self, node: MaybePersistedNode) -> Result<(), FileIoError> {
374375
let Some(addr) = node.as_linear_address() else {
375376
return Ok(());

0 commit comments

Comments
 (0)