mirror of
https://github.com/storytold/cadcraft.git
synced 2026-11-11 16:32:22 -06:00
style: rustfmt the write_atomic map_err in render
This commit is contained in:
@@ -395,8 +395,7 @@ impl Backend for Headless {
|
||||
let png =
|
||||
cadcraft_render::raster::render_png(&list, &view, &cadcraft_render::raster::RasterOptions::default()).ok_or("render failed")?;
|
||||
if let Some(path) = str_p("path") {
|
||||
cadcraft_engine::atomic_write::write_atomic(std::path::Path::new(&path), &png)
|
||||
.map_err(|e| format!("{path}: {e}"))?;
|
||||
cadcraft_engine::atomic_write::write_atomic(std::path::Path::new(&path), &png).map_err(|e| format!("{path}: {e}"))?;
|
||||
}
|
||||
Ok(json!({"pngBase64": cadcraft_engine::cmd::file::base64_encode(&png), "width": w, "height": h}))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user