Skip to content

Commit 3c723b4

Browse files
committed
fix clippy nested-if
1 parent 808d2e0 commit 3c723b4

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

crates/berry-bench-bin/src/main.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -176,10 +176,10 @@ fn load_baseline(path: &str) -> Option<Vec<BenchmarkResult>> {
176176

177177
fn save_baseline(path: &str, results: &[BenchmarkResult]) -> std::io::Result<()> {
178178
let data = serde_json::to_string_pretty(results).expect("serialize baseline");
179-
if let Some(parent) = Path::new(path).parent() {
180-
if !parent.as_os_str().is_empty() {
181-
fs::create_dir_all(parent)?;
182-
}
179+
if let Some(parent) = Path::new(path).parent()
180+
&& !parent.as_os_str().is_empty()
181+
{
182+
fs::create_dir_all(parent)?;
183183
}
184184
fs::write(path, data)
185185
}

0 commit comments

Comments
 (0)