Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Iterators #41

Merged
merged 27 commits into from
Mar 9, 2017
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
69e7d55
add Ancestors and Children iterators
iwburns Feb 2, 2017
c198c6a
add Id version of iterators.
iwburns Feb 2, 2017
4bc1c44
run cargo fmt
iwburns Feb 2, 2017
a2008f1
add some docs for Iterator structs
iwburns Feb 2, 2017
3ebd6b2
fix bad use block
iwburns Feb 2, 2017
20d97c4
add more docs
iwburns Feb 2, 2017
a28c680
WiP: add a few more tests
iwburns Feb 2, 2017
06cc161
remove some extra spaces
iwburns Feb 2, 2017
c60c59e
add PreOrderTraversal (still need docs for it)
iwburns Feb 9, 2017
61d3b79
add PostOrderTraversal (still need docs for it)
iwburns Feb 9, 2017
e543eb0
fix formatting
iwburns Feb 9, 2017
89768e7
update basic example.
iwburns Feb 9, 2017
42a68c1
add struct docs
iwburns Feb 10, 2017
5b31ea6
add more docs.
iwburns Feb 10, 2017
20a4a68
run cargo fmt
iwburns Feb 10, 2017
c661f06
add more iterator tests
iwburns Feb 17, 2017
a5eb1c6
remove unnecessary lifetime
iwburns Feb 18, 2017
ce51cad
get rid of extra usize and bounds checking
iwburns Feb 18, 2017
902a219
update docs example
iwburns Mar 8, 2017
6b3713e
version bump
iwburns Mar 8, 2017
390e07c
Merged branch iterators into iterators
iwburns Mar 9, 2017
c8b7570
add LevelOrderTraversal
iwburns Mar 9, 2017
7e913c9
fix formatting
iwburns Mar 9, 2017
943a53c
switch to storing a vec_deque::IntoIter
iwburns Mar 9, 2017
593fae0
switch to owning the VecDeque and get rid of the process_nodes call
iwburns Mar 9, 2017
ebc54d6
simplify PreOrderTraversal memory layout and next()
iwburns Mar 9, 2017
fcea716
fix formatting
iwburns Mar 9, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/behaviors.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use super::NodeId;
use NodeId;

///
/// Describes the possible behaviors of the `Tree::remove_node` method.
Expand Down
6 changes: 6 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,12 @@ pub use node::NodeBuilder;
pub use node::Node;
pub use tree::TreeBuilder;
pub use tree::Tree;
pub use tree::iterators::Ancestors;
pub use tree::iterators::AncestorIds;
pub use tree::iterators::Children;
pub use tree::iterators::ChildrenIds;
pub use tree::iterators::PreOrderTraversal;
pub use tree::iterators::PostOrderTraversal;

///
/// An identifier used to differentiate between `Node`s within a `Tree`.
Expand Down
4 changes: 2 additions & 2 deletions src/node.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use super::NodeId;
use super::MutableNode;
use NodeId;
use MutableNode;

///
/// A `Node` builder that provides more control over how a `Node` is created.
Expand Down
Loading