Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
proycon committed Mar 4, 2024
1 parent 1e25dd7 commit b9c3bbc
Showing 1 changed file with 0 additions and 22 deletions.
22 changes: 0 additions & 22 deletions src/api/transpose.rs
Original file line number Diff line number Diff line change
Expand Up @@ -364,25 +364,3 @@ impl<'store> ResultItem<'store, Annotation> {
}
}
}

/// Finds matches of one textselection in another
fn transpose_find_sources(
tsel: &TextSelection,
reftsel: &TextSelection,
sources: &mut Vec<TextSelection>,
) -> bool {
if let Some((intersection, tsel_remainder, reftsel_remainder)) = tsel.intersection(reftsel) {
sources.push(intersection);
if let (Some(tsel_remainder), Some(reftsel_remainder)) = (tsel_remainder, reftsel_remainder)
{
// there is still a remainder left to process:
transpose_find_sources(&tsel_remainder, &reftsel_remainder, sources)
} else {
// we are done if there is no remainder anymore for the current text selection
tsel_remainder.is_none()
}
} else {
sources.clear(); //clear the buffer, results lead nowhere
false
}
}

0 comments on commit b9c3bbc

Please sign in to comment.