diff options
author | JSDurand <mmemmew@gmail.com> | 2023-01-06 23:42:28 +0800 |
---|---|---|
committer | JSDurand <mmemmew@gmail.com> | 2023-01-06 23:42:28 +0800 |
commit | f27d604d93ce583d4404e1874664e08382ea2f00 (patch) | |
tree | 6fa8df26af954e94f3604ffabde4961ee8108c41 /forest/src/default.rs | |
parent | 7dd4935230e303aef8d295d992239d59d95b32d7 (diff) |
Save before system restart.
I am about to re-start my system, so I save before any crashes
happen.
Diffstat (limited to 'forest/src/default.rs')
-rw-r--r-- | forest/src/default.rs | 14 |
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() } } |