Avoid using env::temp when linking a binary

This keeps all build artefacts (even temporary ones) within the build directory.
This commit is contained in:
Chris Denton 2025-12-23 15:50:33 +00:00
parent eb171a227f
commit b5c473e414
No known key found for this signature in database
GPG key ID: 713472F2F45627DE
3 changed files with 11 additions and 14 deletions

View file

@ -1,6 +1,6 @@
use std::ffi::{CString, OsStr};
use std::path::{Path, PathBuf, absolute};
use std::{env, fs, io};
use std::{fs, io};
use tempfile::TempDir;
@ -139,8 +139,4 @@ impl<'a, 'b> TempDirBuilder<'a, 'b> {
}
self.builder.tempdir_in(dir)
}
pub fn tempdir(&self) -> io::Result<TempDir> {
self.tempdir_in(env::temp_dir())
}
}