Skip to content

Commit

Permalink
Make function public and prefer references to hashmap of matched lines
Browse files Browse the repository at this point in the history
  • Loading branch information
Wilfred committed Jul 6, 2021
1 parent 45efe52 commit 99f357f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/syntax.rs
Original file line number Diff line number Diff line change
Expand Up @@ -551,11 +551,11 @@ fn zip_lines(lhs: &[SingleLineSpan], rhs: &[SingleLineSpan]) -> Vec<(LineNumber,
.collect()
}

fn aligned_lines(
pub fn aligned_lines(
lhs_lines: &[LineNumber],
rhs_lines: &[LineNumber],
lhs_line_matches: HashMap<LineNumber, LineNumber>,
rhs_line_matches: HashMap<LineNumber, LineNumber>,
lhs_line_matches: &HashMap<LineNumber, LineNumber>,
rhs_line_matches: &HashMap<LineNumber, LineNumber>,
) -> Vec<(Option<LineNumber>, Option<LineNumber>)> {
// Find RHS lines that we can match up.
let mut lhs_opposite_lines = vec![];
Expand Down Expand Up @@ -611,7 +611,7 @@ fn aligned_lines(
res
}

fn matching_lines<'a>(nodes: &[Syntax<'a>]) -> HashMap<LineNumber, LineNumber> {
pub fn matching_lines<'a>(nodes: &[&Syntax<'a>]) -> HashMap<LineNumber, LineNumber> {
let mut res = HashMap::new();
for node in nodes {
matching_lines_(node, &mut res);
Expand Down

0 comments on commit 99f357f

Please sign in to comment.