mirror of
https://github.com/storytold/designcraft.git
synced 2026-11-10 04:22:34 +00:00
Fix CLI build warnings on Windows (#2356)
This commit is contained in:
1 parent
0e85e9e5ec
commit
e16785ea50
2 files changed
+6
No files matched your search
@@ -34,7 +34,10 @@ fn main() -> Result<(), String> {
|
||||
// made with a link in it): the files written here are the benchmark's alone.
|
||||
let nanos = std::time::SystemTime::UNIX_EPOCH.elapsed().map_or(0, |d| d.as_nanos());
|
||||
let dir = std::env::temp_dir().join(format!("designcraft-pdf-bench-{}-{nanos}", std::process::id()));
|
||||
#[cfg(unix)]
|
||||
let mut builder = std::fs::DirBuilder::new();
|
||||
#[cfg(not(unix))]
|
||||
let builder = std::fs::DirBuilder::new();
|
||||
#[cfg(unix)]
|
||||
{
|
||||
use std::os::unix::fs::DirBuilderExt;
|
||||
|
||||
@@ -656,7 +656,10 @@ fn thumbnail_refuses_an_output_that_names_the_input() {
|
||||
let doc = dir.join("a.designcraft");
|
||||
make_document(&doc);
|
||||
let saved = std::fs::read(&doc).unwrap();
|
||||
#[cfg(unix)]
|
||||
let mut outs = vec![doc.clone(), dir.join(".").join("a.designcraft")];
|
||||
#[cfg(not(unix))]
|
||||
let outs = vec![doc.clone(), dir.join(".").join("a.designcraft")];
|
||||
#[cfg(unix)]
|
||||
{
|
||||
let link = dir.join("link.png");
|
||||
|
||||
Reference in new issue
Block a user