replace compare_term_test with parallel iterator, add is_not_variant

This commit is contained in:
Mark Thom
2025-12-11 22:08:16 -08:00
parent 9089f9ddb4
commit 29cd80510b
10 changed files with 488 additions and 475 deletions

View File

@@ -170,13 +170,9 @@ impl PartialOrd<BranchNumber> for BranchNumber {
impl BranchNumber {
pub(crate) fn has_as_subbranch(&self, other: &Self) -> bool {
let delta_ratio = &self.delta / &other.delta;
if !delta_ratio.denominator().is_one() {
return false;
}
other.branch_num >= self.branch_num && other.branch_num < &self.branch_num + &self.delta
other.delta <= self.delta &&
other.branch_num >= self.branch_num &&
other.branch_num < &self.branch_num + &self.delta
}
pub(crate) fn split(&self) -> BranchNumber {