We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 808d2e0 commit 3c723b4Copy full SHA for 3c723b4
1 file changed
crates/berry-bench-bin/src/main.rs
@@ -176,10 +176,10 @@ fn load_baseline(path: &str) -> Option<Vec<BenchmarkResult>> {
176
177
fn save_baseline(path: &str, results: &[BenchmarkResult]) -> std::io::Result<()> {
178
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
- }
+ if let Some(parent) = Path::new(path).parent()
+ && !parent.as_os_str().is_empty()
+ {
+ fs::create_dir_all(parent)?;
183
}
184
fs::write(path, data)
185
0 commit comments