Skip to content

Commit ff8b60c

Browse files
committed
factor out repeated function call
1 parent cb0bd4c commit ff8b60c

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

cpp-linter/tests/comments.rs

+3-4
Original file line numberDiff line numberDiff line change
@@ -121,12 +121,11 @@ async fn setup(lib_root: &Path, test_params: &TestParams) {
121121
200
122122
});
123123
if test_params.bad_existing_comments {
124-
mock = mock.with_body(String::new()).create();
124+
mock = mock.with_body(String::new());
125125
} else {
126-
mock = mock
127-
.with_body_from_file(format!("{asset_path}push_comments_{SHA}.json"))
128-
.create();
126+
mock = mock.with_body_from_file(format!("{asset_path}push_comments_{SHA}.json"));
129127
}
128+
mock = mock.create();
130129
mocks.push(mock);
131130
} else {
132131
let pr_endpoint = format!("/repos/{REPO}/issues/{PR}/comments");

0 commit comments

Comments
 (0)