Skip to content

Commit

Permalink
Remove the unsafe Send impl of the iterators
Browse files Browse the repository at this point in the history
  • Loading branch information
Kerollmops committed Mar 5, 2025
1 parent a3c4f74 commit 7008b9f
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 13 deletions.
5 changes: 0 additions & 5 deletions heed/src/iterator/iter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -208,9 +208,6 @@ impl<KC, DC, IM> fmt::Debug for RoIter<'_, KC, DC, IM> {
}
}

/// A `RoIter` is `Send` only if the `RoTxn` is.
unsafe impl<KC, DC, IM> Send for RoIter<'_, KC, DC, IM> {}

/// A read-write iterator structure.
pub struct RwIter<'txn, KC, DC, IM = MoveThroughDuplicateValues> {
cursor: RwCursor<'txn>,
Expand Down Expand Up @@ -557,8 +554,6 @@ impl<KC, DC, IM> fmt::Debug for RoRevIter<'_, KC, DC, IM> {
}
}

unsafe impl<KC, DC, IM> Send for RoRevIter<'_, KC, DC, IM> {}

/// A reverse read-write iterator structure.
pub struct RwRevIter<'txn, KC, DC, IM = MoveThroughDuplicateValues> {
cursor: RwCursor<'txn>,
Expand Down
4 changes: 0 additions & 4 deletions heed/src/iterator/prefix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,6 @@ impl<KC, DC, C, IM> fmt::Debug for RoPrefix<'_, KC, DC, C, IM> {
}
}

unsafe impl<KC, DC, IM> Send for RoPrefix<'_, WithoutTls, KC, DC, IM> {}

/// A read-write prefix iterator structure.
pub struct RwPrefix<'txn, KC, DC, C = DefaultComparator, IM = MoveThroughDuplicateValues> {
cursor: RwCursor<'txn>,
Expand Down Expand Up @@ -589,8 +587,6 @@ impl<KC, DC, C, IM> fmt::Debug for RoRevPrefix<'_, KC, DC, C, IM> {
}
}

unsafe impl<KC, DC, IM> Send for RoRevPrefix<'_, WithoutTls, KC, DC, IM> {}

/// A reverse read-write prefix iterator structure.
pub struct RwRevPrefix<'txn, KC, DC, C = DefaultComparator, IM = MoveThroughDuplicateValues> {
cursor: RwCursor<'txn>,
Expand Down
4 changes: 0 additions & 4 deletions heed/src/iterator/range.rs
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,6 @@ impl<KC, DC, C, IM> fmt::Debug for RoRange<'_, KC, DC, C, IM> {
}
}

unsafe impl<KC, DC, C, IM> Send for RoRange<'_, KC, DC, C, IM> {}

/// A read-write range iterator structure.
pub struct RwRange<'txn, KC, DC, C = DefaultComparator, IM = MoveThroughDuplicateValues> {
cursor: RwCursor<'txn>,
Expand Down Expand Up @@ -637,8 +635,6 @@ impl<KC, DC, C, IM> fmt::Debug for RoRevRange<'_, KC, DC, C, IM> {
}
}

unsafe impl<KC, DC, C, IM> Send for RoRevRange<'_, KC, DC, C, IM> {}

/// A reverse read-write range iterator structure.
pub struct RwRevRange<'txn, KC, DC, C = DefaultComparator, IM = MoveThroughDuplicateValues> {
cursor: RwCursor<'txn>,
Expand Down

0 comments on commit 7008b9f

Please sign in to comment.