Skip to content

Commit

Permalink
Simplify Option matching
Browse files Browse the repository at this point in the history
  • Loading branch information
cdesaintguilhem committed Oct 13, 2024
1 parent 8a6e868 commit ac164ad
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions src/format.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,15 +72,9 @@ pub fn format_file(
if needs_wrap(&line, &temp_state, args) {
let wrapped_lines =
apply_wrap(&line, &temp_state, file, args, logs);
if wrapped_lines.is_some() {
queue.push((
linum_old,
wrapped_lines.clone().unwrap().1,
));
queue.push((
linum_old,
wrapped_lines.clone().unwrap().0,
));
if let Some((this_line, next_line)) = wrapped_lines {
queue.push((linum_old, next_line));
queue.push((linum_old, this_line));
continue;
}
}
Expand Down

0 comments on commit ac164ad

Please sign in to comment.