From 55a1f8d3daef309b5e73864bcbe6c307843e209e Mon Sep 17 00:00:00 2001 From: Mark Date: Mon, 10 Jul 2023 10:32:15 -0600 Subject: [PATCH] clean commented code from disjuncts.rs --- src/machine/disjuncts.rs | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/src/machine/disjuncts.rs b/src/machine/disjuncts.rs index f2a66851..c1a71802 100644 --- a/src/machine/disjuncts.rs +++ b/src/machine/disjuncts.rs @@ -155,7 +155,6 @@ enum TraversalState { RemoveBranchNum, // pop the current_branch_num and from the root set. AddBranchNum(BranchNumber), // set current_branch_num, add it to the root set RepBranchNum(BranchNumber), // replace current_branch_num and the latest in the root set - // SetChunkType(ChunkType), // consider remaining terms as belonging to a last chunk } #[derive(Debug)] @@ -214,25 +213,11 @@ impl VarData { pub type ClassifyFactResult = (Term, VarData); pub type ClassifyRuleResult = (Term, ChunkedTermVec, VarData); -fn merge_branch_seq>(branches: Iter) -> BranchInfo { +fn merge_branch_seq(branches: impl Iterator) -> BranchInfo { let mut branch_info = BranchInfo::new(BranchNumber::default()); for mut branch in branches { branch_info.branch_num = branch.branch_num; - - /* - if let Some(last_chunk) = branch_info.chunks.last_mut() { - if let Some(first_moved_chunk) = branch.chunks.first_mut() { - if last_chunk.chunk_num == first_moved_chunk.chunk_num { - last_chunk.vars.extend(first_moved_chunk.vars.drain(..)); - branch_info.chunks.extend(branch.chunks.drain(1 ..)); - - continue; - } - } - } - */ - branch_info.chunks.extend(branch.chunks.drain(..)); } -- 2.54.0