Skip to content

Commit b061d9b

Browse files
committed
Pass TestConfig to normalize
1 parent 16e070b commit b061d9b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1037,7 +1037,7 @@ fn check_output(
10371037
kind: &'static str,
10381038
config: &TestConfig,
10391039
) -> PathBuf {
1040-
let output = normalize(output, config.comments, config.revision, kind);
1040+
let output = normalize(output, config, kind);
10411041
let path = output_path(config, kind);
10421042
match &config.config.output_conflict_handling {
10431043
OutputConflictHandling::Error => {
@@ -1073,10 +1073,10 @@ fn output_path(config: &TestConfig<'_>, kind: &str) -> PathBuf {
10731073
config.path.with_extension(ext)
10741074
}
10751075

1076-
fn normalize(text: &[u8], comments: &Comments, revision: &str, kind: &'static str) -> Vec<u8> {
1076+
fn normalize(text: &[u8], config: &TestConfig, kind: &'static str) -> Vec<u8> {
10771077
let mut text = text.to_owned();
10781078

1079-
for (from, to) in comments.for_revision(revision).flat_map(|r| match kind {
1079+
for (from, to) in config.comments().flat_map(|r| match kind {
10801080
"fixed" => &[] as &[_],
10811081
"stderr" => &r.normalize_stderr,
10821082
"stdout" => &r.normalize_stdout,

0 commit comments

Comments
 (0)