diff options
author | JSDurand <mmemmew@gmail.com> | 2023-07-18 11:55:03 +0800 |
---|---|---|
committer | JSDurand <mmemmew@gmail.com> | 2023-07-18 11:58:00 +0800 |
commit | 5a5f7e5be9498af219a36401b1d2a13b553402e8 (patch) | |
tree | 87a0351dc00cda0555193421979a4a312185fe25 /chain/src/item/default/mod.rs | |
parent | 9a5359bcc8d47de7222d07035ae99459d49e810e (diff) |
Fix a bug of unnecessarily cloning nodes.
* chain/src/item/default/splone.rs: Previously when we split nodes, we
always clone the parent if the labels differ. This turns out to be
incorrect if the new label is open whereas the old label is closed.
In that case, the old parent should not contain the new node as a
child, as a closed node should not contain an open node.
I am not yet entirely sure this fix is correct, so more test await
us.
Diffstat (limited to 'chain/src/item/default/mod.rs')
-rw-r--r-- | chain/src/item/default/mod.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/chain/src/item/default/mod.rs b/chain/src/item/default/mod.rs index 0781dd2..7369c6f 100644 --- a/chain/src/item/default/mod.rs +++ b/chain/src/item/default/mod.rs @@ -1,3 +1,4 @@ +#![debugger_visualizer(gdb_script_file = "printer.py")] //! This module provides a default implementation of iten derivation //! forest. @@ -72,6 +73,8 @@ impl From<ForestLabelError> for Error { } } +// FIXME: Provide a better Debug implementation. + /// A default implementation of forest. #[derive(Debug, Clone, Graph)] pub struct DefaultForest<T: GraphLabel> { |