Skip to content

Commit 1dad5d9

Browse files
cchanginglrh2000
authored andcommitted
Add the default mark type for the public struct in this crate
1 parent 72a4067 commit 1dad5d9

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

src/cursor.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use smallvec::SmallVec;
44

55
use crate::borrow::{DestroyableMutRef, DestroyableRef, DormantMutRef};
66
use crate::entry::{ItemEntry, NodeMaybeMut, XEntry};
7-
use crate::mark::XMark;
7+
use crate::mark::{NoneMark, XMark};
88
use crate::node::XNode;
99
use crate::xarray::{XArray, MAX_HEIGHT, SLOT_SIZE};
1010

@@ -198,7 +198,7 @@ impl<'a, I: ItemEntry> CursorState<'a, I, ReadWrite> {
198198
/// `XArray` at the same time.
199199
///
200200
/// The typical way to obtain a `Cursor` instance is to call [`XArray::cursor`].
201-
pub struct Cursor<'a, I, M>
201+
pub struct Cursor<'a, I, M = NoneMark>
202202
where
203203
I: ItemEntry,
204204
M: Into<XMark>,
@@ -409,7 +409,7 @@ impl<'a, I: ItemEntry> NodeMutRef<'a, I> {
409409
/// the `XArray`. However, just before performing the modification, `CursorMut` will create
410410
/// exclusive copies by cloning shared items, which guarantees the isolation of data stored in
411411
/// different `XArray`s.
412-
pub struct CursorMut<'a, I, M>
412+
pub struct CursorMut<'a, I, M = NoneMark>
413413
where
414414
I: ItemEntry,
415415
M: Into<XMark>,

src/range.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
use crate::cursor::Cursor;
22
use crate::entry::ItemEntry;
3-
use crate::mark::XMark;
3+
use crate::mark::{NoneMark, XMark};
44

55
/// An iterator over a range of entries in an [`XArray`].
66
///
77
/// The typical way to obtain a `Range` instance is to call [`XArray::range`].
88
///
99
/// [`XArray`]: crate::XArray
1010
/// [`XArray::range`]: crate::XArray::range
11-
pub struct Range<'a, I, M>
11+
pub struct Range<'a, I, M = NoneMark>
1212
where
1313
I: ItemEntry,
1414
M: Into<XMark>,

0 commit comments

Comments
 (0)