Skip to content

Commit 930c3d5

Browse files
committed
Fix lint
1 parent 0c25a13 commit 930c3d5

File tree

2 files changed

+9
-13
lines changed

2 files changed

+9
-13
lines changed

opentelemetry-prometheus/tests/integration_test.rs

+2-4
Original file line numberDiff line numberDiff line change
@@ -409,8 +409,7 @@ fn gather_and_compare(registry: prometheus::Registry, expected: String, name: &'
409409

410410
if cfg!(windows) {
411411
output_string = String::from_utf8(output).unwrap().replace("\n", "\r\n");
412-
}
413-
else {
412+
} else {
414413
output_string = String::from_utf8(output).unwrap();
415414
}
416415

@@ -828,8 +827,7 @@ fn gather_and_compare_multi(
828827

829828
if cfg!(windows) {
830829
output_string = String::from_utf8(output).unwrap().replace("\n", "\r\n");
831-
}
832-
else {
830+
} else {
833831
output_string = String::from_utf8(output).unwrap();
834832
}
835833

opentelemetry-proto/tests/grpc_build.rs

+7-9
Original file line numberDiff line numberDiff line change
@@ -111,16 +111,14 @@ fn build_content_map(path: impl AsRef<Path>, normalize_line_feed: bool) -> HashM
111111

112112
let file_contents;
113113
if normalize_line_feed && cfg!(windows) {
114-
file_contents = std::fs::read_to_string(path.clone()).expect("cannot read from existing generated file").replace("\n", "\r\n");
114+
file_contents = std::fs::read_to_string(path.clone())
115+
.expect("cannot read from existing generated file")
116+
.replace("\n", "\r\n");
117+
} else {
118+
file_contents = std::fs::read_to_string(path.clone())
119+
.expect("cannot read from existing generated file");
115120
}
116-
else {
117-
file_contents = std::fs::read_to_string(path.clone()).expect("cannot read from existing generated file");
118-
}
119-
120-
(
121-
file_name.to_string_lossy().to_string(),
122-
file_contents,
123-
)
121+
(file_name.to_string_lossy().to_string(), file_contents)
124122
})
125123
.collect()
126124
}

0 commit comments

Comments
 (0)