Skip to content

Commit 633d40a

Browse files
refactor: remove ambiguous and broken cursor/cursor_mut in favor of root/root_mut methods (#164)
1 parent f1a296c commit 633d40a

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

libs/wavltree/src/lib.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -492,20 +492,20 @@ where
492492
}
493493
}
494494

495-
/// Returns a cursor over the entire tree.
495+
/// Returns a cursor to the root of the tree.
496496
#[inline]
497-
pub fn cursor(&self) -> Cursor<'_, T> {
497+
pub fn root(&self) -> Cursor<'_, T> {
498498
Cursor {
499-
current: None,
499+
current: self.root,
500500
_tree: self,
501501
}
502502
}
503503

504-
/// Returns a mutable cursor over the entire tree.
504+
/// Returns a mutable cursor to the root of the tree.
505505
#[inline]
506-
pub fn cursor_mut(&mut self) -> CursorMut<'_, T> {
506+
pub fn root_mut(&mut self) -> CursorMut<'_, T> {
507507
CursorMut {
508-
current: None,
508+
current: self.root,
509509
_tree: self,
510510
}
511511
}

0 commit comments

Comments
 (0)