Skip to content

Commit

Permalink
code review change
Browse files Browse the repository at this point in the history
  • Loading branch information
robamu committed Jan 15, 2025
1 parent e5594ba commit 882021b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ci/svd2rust-regress/src/diff.rs
Original file line number Diff line number Diff line change
Expand Up @@ -257,8 +257,8 @@ impl Diffing {
Ok([baseline, current])
}

fn get_source_and_command<'s>(&'s self) -> [Option<(Source<'s>, Command<'s>)>; 2] {
let split = |s: &'s str| -> (Source, Command) {
fn get_source_and_command(&self) -> [Option<(Source, Command)>; 2] {
fn split(s: &str) -> (Source, Command) {
if let Some(s) = s.strip_prefix('@') {
if let Some((source, cmd)) = s.split_once(' ') {
(Some(source), Some(cmd.trim()))
Expand All @@ -268,7 +268,7 @@ impl Diffing {
} else {
(None, Some(s.trim()))
}
};
}

let baseline = self.baseline.as_deref().map(split);

Expand Down

0 comments on commit 882021b

Please sign in to comment.