mirror of
https://github.com/storytold/designcraft.git
synced 2026-10-24 10:16:59 -06:00
Integration: cargo fmt
This commit is contained in:
@@ -277,7 +277,9 @@ fn every_writing_command_is_refused_outside_the_write_root() {
|
||||
ok(&mut server, tool, json!({"path": inside(&format!("{tool}.png"))}));
|
||||
assert!(base.join("out").join(format!("{tool}.png")).exists(), "{tool}");
|
||||
}
|
||||
for file in ["out-file.save.designcraft", "out-file.exportPdf", "out-file.exportIdml", "out-book.exportPdf", "out-swatch.save", "out-snippet.export"] {
|
||||
for file in
|
||||
["out-file.save.designcraft", "out-file.exportPdf", "out-file.exportIdml", "out-book.exportPdf", "out-swatch.save", "out-snippet.export"]
|
||||
{
|
||||
assert!(base.join("out").join(file).exists(), "{file}");
|
||||
}
|
||||
assert!(base.join("out/dir-file.package/Instructions.txt").exists() && base.join("out/dir-links.copyTo/pic.png").exists());
|
||||
|
||||
@@ -1298,7 +1298,8 @@ impl DesignApp {
|
||||
return self.run("swatch.load", json!({"path": path}));
|
||||
}
|
||||
let document = opens_as_document(path)
|
||||
|| (std::path::Path::new(path).extension().is_none() && designcraft_engine::io::read(path).is_ok_and(|b| designcraft_engine::cmd::is_document(&b)));
|
||||
|| (std::path::Path::new(path).extension().is_none()
|
||||
&& designcraft_engine::io::read(path).is_ok_and(|b| designcraft_engine::cmd::is_document(&b)));
|
||||
if document {
|
||||
return self.open_file("file.open", json!({"path": path}));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user