Skip to content

Commit 963055b

Browse files
committed
Slightly improved docs for traversal docs. (#470)
1 parent 0670468 commit 963055b

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

git-repository/src/object/tree/traverse.rs

+7-4
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ impl<'repo> Tree<'repo> {
1515
/// An intermediate object to start traversing the parent tree from.
1616
pub struct Platform<'a, 'repo> {
1717
root: &'a Tree<'repo>,
18-
#[allow(missing_docs)] // TODO
18+
/// Provides easy access to presets for common breadth-first traversal.
1919
pub breadthfirst: BreadthFirstPresets<'a, 'repo>,
2020
}
2121

22-
#[allow(missing_docs)] // TODO
22+
/// Presets for common choices in breadth-first traversal.
2323
#[derive(Copy, Clone)]
2424
pub struct BreadthFirstPresets<'a, 'repo> {
2525
root: &'a Tree<'repo>,
@@ -39,8 +39,11 @@ impl<'a, 'repo> BreadthFirstPresets<'a, 'repo> {
3939
}
4040

4141
impl<'a, 'repo> Platform<'a, 'repo> {
42-
/// Start a breadth-first traversal with a delegate, note that it's not sorted.
43-
/// TODO: more docs or links to git-traverse
42+
/// Start a breadth-first traversal using `delegate`, for which a [`Recorder`][git_traverse::tree::Recorder] can be used to get started.
43+
///
44+
/// # Note
45+
///
46+
/// Results are not sorted.
4447
pub fn breadthfirst<V>(&self, delegate: &mut V) -> Result<(), git_traverse::tree::breadthfirst::Error>
4548
where
4649
V: git_traverse::tree::Visit,

0 commit comments

Comments
 (0)