Skip to content

Commit cdb85f0

Browse files
committed
review changes
1 parent 7f186f4 commit cdb85f0

1 file changed

Lines changed: 7 additions & 8 deletions

File tree

cpp-linter/src/rest_client.rs

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -142,15 +142,14 @@ impl RestClient {
142142
let output_file = if summary_output_file.is_absolute() {
143143
summary_output_file
144144
} else {
145-
let out = feedback_inputs.repo_root.join(&summary_output_file);
146-
if let Some(parent) = out.parent() {
147-
std::fs::create_dir_all(parent).map_err(|e| ClientError::MkDirFailed {
148-
file_path: out.clone(),
149-
source: e,
150-
})?;
151-
}
152-
out
145+
feedback_inputs.repo_root.join(&summary_output_file)
153146
};
147+
if let Some(parent) = output_file.parent() {
148+
std::fs::create_dir_all(parent).map_err(|e| ClientError::MkDirFailed {
149+
file_path: output_file.clone(),
150+
source: e,
151+
})?;
152+
}
154153
std::fs::write(&output_file, &summary).map_err(|e| {
155154
ClientError::SummaryOutputFileWriteFailed {
156155
file_path: output_file,

0 commit comments

Comments
 (0)