fix(test): allow the unused mut on Windows in the private test folders (#7595)

#5923 made the pptx LibreOffice test and the staging tests build their
folders with a DirBuilder that only Unix sets a mode on. On Windows the
binding is never changed, so -D warnings stops the build with unused_mut
and main's Windows gate is red.
This commit is contained in:
FredApps authored and GitHub committed 2026-11-17 05:52:32 +01:00
1 parent 9892160ed6
commit a49949388b
2 files changed
+4

No files matched your search

+2
View File
@@ -382,6 +382,8 @@ fn pptx_opens_in_libreoffice() {
// A new folder of our own, never one left (or planted) at a guessable name.
let nanos = std::time::SystemTime::now().duration_since(std::time::UNIX_EPOCH).map_or(0, |d| d.as_nanos());
let dir = std::env::temp_dir().join(format!("pdfcraft-pptx-lo-{}-{nanos:x}", std::process::id()));
// Only Unix sets a mode on it, so elsewhere `made` is never changed.
#[cfg_attr(not(unix), allow(unused_mut))]
let mut made = std::fs::DirBuilder::new();
#[cfg(unix)]
{
+2
View File
@@ -6,6 +6,8 @@ fn test_dir(test: &str) -> PathBuf {
let seed = std::time::SystemTime::now().duration_since(std::time::UNIX_EPOCH).map_or(0, |d| d.as_nanos());
for n in 0..64u32 {
let dir = std::env::temp_dir().join(format!("pdfcraft-platform-staging-{}-{test}-{:x}", std::process::id(), seed.wrapping_add(n.into())));
// Only Unix sets a mode on it, so elsewhere `made` is never changed.
#[cfg_attr(not(unix), allow(unused_mut))]
let mut made = std::fs::DirBuilder::new();
#[cfg(unix)]
{