summaryrefslogtreecommitdiff
path: root/forest/src/default.rs
diff options
context:
space:
mode:
Diffstat (limited to 'forest/src/default.rs')
-rw-r--r--forest/src/default.rs14
1 files changed, 1 insertions, 13 deletions
diff --git a/forest/src/default.rs b/forest/src/default.rs
index 456413b..5e438d4 100644
--- a/forest/src/default.rs
+++ b/forest/src/default.rs
@@ -61,14 +61,6 @@ impl<NodeLabel: GraphLabel, EdgeLabel: GraphLabel> Graph for DefaultForest<NodeL
}
}
-impl<NodeLabel: GraphLabel, EdgeLabel: GraphLabel> ExtGraph
- for DefaultForest<NodeLabel, EdgeLabel>
-{
- fn extend(&mut self, edges: impl IntoIterator<Item = usize>) -> Result<usize, GraphError> {
- self.graph.extend(edges)
- }
-}
-
#[derive(Debug)]
pub struct LabelIter<'a> {
set_iter: Iter<'a, usize>,
@@ -88,11 +80,7 @@ impl<'a> Iterator for LabelIter<'a> {
impl<'a> ExactSizeIterator for LabelIter<'a> {
fn len(&self) -> usize {
- let (lower, upper) = self.size_hint();
- // Note: This assertion is overly defensive, but it checks the
- // invariant guaranteed by the trait.
- debug_assert!(upper == Some(lower));
- lower
+ self.set_iter.len()
}
}