Skip to content

Commit

Permalink
?Sized bounds for range method (#98)
Browse files Browse the repository at this point in the history
  • Loading branch information
Erigara authored Nov 2, 2023
1 parent 156890c commit e2eb4fa
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions src/bptree/impl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ impl<'a, K: Clone + Ord + Debug + Sync + Send + 'static, V: Clone + Sync + Send
pub fn range<'b, R, T>(&'b self, range: R) -> RangeIter<'b, K, V>
where
K: Borrow<T>,
T: Ord,
T: Ord + ?Sized,
R: RangeBounds<T>,
{
self.inner.as_ref().range(range)
Expand Down Expand Up @@ -344,7 +344,7 @@ impl<'a, K: Clone + Ord + Debug + Sync + Send + 'static, V: Clone + Sync + Send
pub fn range<'b, R, T>(&'b self, range: R) -> RangeIter<'b, K, V>
where
K: Borrow<T>,
T: Ord,
T: Ord + ?Sized,
R: RangeBounds<T>,
{
self.inner.as_ref().range(range)
Expand Down Expand Up @@ -435,7 +435,7 @@ impl<'a, K: Clone + Ord + Debug + Sync + Send + 'static, V: Clone + Sync + Send
pub fn range<'b, R, T>(&'b self, range: R) -> RangeIter<'b, K, V>
where
K: Borrow<T>,
T: Ord,
T: Ord + ?Sized,
R: RangeBounds<T>,
{
match self.inner {
Expand Down
2 changes: 1 addition & 1 deletion src/internals/bptree/cursor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ pub(crate) trait CursorReadOps<K: Clone + Ord + Debug, V: Clone> {
fn range<'a, R, T>(&'a self, range: R) -> RangeIter<'a, K, V>
where
K: Borrow<T>,
T: Ord,
T: Ord + ?Sized,
R: RangeBounds<T>,
{
RangeIter::new(self.get_root(), range, self.len())
Expand Down
6 changes: 3 additions & 3 deletions src/internals/bptree/iter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ where
{
pub(crate) fn new<T>(root: *mut Node<K, V>, bound: Bound<&T>) -> Self
where
T: Ord,
T: Ord + ?Sized,
K: Borrow<T>,
{
// We need to position the VecDeque here.
Expand Down Expand Up @@ -165,7 +165,7 @@ where
{
pub(crate) fn new<T>(root: *mut Node<K, V>, bound: Bound<&T>) -> Self
where
T: Ord,
T: Ord + ?Sized,
K: Borrow<T>,
{
// We need to position the VecDeque here.
Expand Down Expand Up @@ -443,7 +443,7 @@ where
{
pub(crate) fn new<R, T>(root: *mut Node<K, V>, range: R, length: usize) -> Self
where
T: Ord,
T: Ord + ?Sized,
K: Borrow<T>,
R: RangeBounds<T>,
{
Expand Down

0 comments on commit e2eb4fa

Please sign in to comment.