Skip to content

Commit

Permalink
Fix miri
Browse files Browse the repository at this point in the history
  • Loading branch information
al8n committed Oct 26, 2024
1 parent 8bd96e0 commit 32db254
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions src/memtable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,12 @@ pub trait BaseTable {
Self: Sized;

/// Inserts a pointer into the memtable.
fn insert(&mut self, ele: Self::Pointer) -> Result<(), Self::Error>
fn insert(&self, ele: Self::Pointer) -> Result<(), Self::Error>
where
Self::Pointer: Pointer + Ord + 'static;

/// Removes the pointer associated with the key.
fn remove(&mut self, key: Self::Pointer) -> Result<(), Self::Error>
fn remove(&self, key: Self::Pointer) -> Result<(), Self::Error>
where
Self::Pointer: Pointer + Ord + 'static;
}
Expand Down
4 changes: 2 additions & 2 deletions src/memtable/arena/multiple_version.rs
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ where
.map(|map| Self { map })
}

fn insert(&mut self, ele: Self::Pointer) -> Result<(), Self::Error>
fn insert(&self, ele: Self::Pointer) -> Result<(), Self::Error>
where
Self::Pointer: Pointer + Ord + 'static,
{
Expand All @@ -142,7 +142,7 @@ where
})
}

fn remove(&mut self, key: Self::Pointer) -> Result<(), Self::Error>
fn remove(&self, key: Self::Pointer) -> Result<(), Self::Error>
where
Self::Pointer: Pointer + Ord + 'static,
{
Expand Down
4 changes: 2 additions & 2 deletions src/memtable/arena/table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ where
.map(|map| Self { map })
}

fn insert(&mut self, ele: Self::Pointer) -> Result<(), Self::Error>
fn insert(&self, ele: Self::Pointer) -> Result<(), Self::Error>
where
Self::Pointer: Pointer + Ord + 'static,
{
Expand All @@ -108,7 +108,7 @@ where
})
}

fn remove(&mut self, key: Self::Pointer) -> Result<(), Self::Error>
fn remove(&self, key: Self::Pointer) -> Result<(), Self::Error>
where
Self::Pointer: Pointer + Ord + 'static,
{
Expand Down
4 changes: 2 additions & 2 deletions src/memtable/linked/multiple_version.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ where
}

#[inline]
fn insert(&mut self, ele: Self::Pointer) -> Result<(), Self::Error>
fn insert(&self, ele: Self::Pointer) -> Result<(), Self::Error>
where
Self::Pointer: Pointer + Ord + 'static,
{
Expand All @@ -122,7 +122,7 @@ where
}

#[inline]
fn remove(&mut self, key: Self::Pointer) -> Result<(), Self::Error>
fn remove(&self, key: Self::Pointer) -> Result<(), Self::Error>
where
Self::Pointer: crate::sealed::Pointer + Ord + 'static,
{
Expand Down
4 changes: 2 additions & 2 deletions src/memtable/linked/table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ where
}

#[inline]
fn insert(&mut self, ele: Self::Pointer) -> Result<(), Self::Error>
fn insert(&self, ele: Self::Pointer) -> Result<(), Self::Error>
where
Self::Pointer: Ord + 'static,
{
Expand All @@ -83,7 +83,7 @@ where
}

#[inline]
fn remove(&mut self, key: Self::Pointer) -> Result<(), Self::Error>
fn remove(&self, key: Self::Pointer) -> Result<(), Self::Error>
where
Self::Pointer: crate::sealed::Pointer + Ord + 'static,
{
Expand Down

0 comments on commit 32db254

Please sign in to comment.