We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4529f1e commit c55fc83Copy full SHA for c55fc83
crates/composefs/src/test.rs
@@ -1,12 +1,8 @@
1
//! Tests
2
3
-use std::{
4
- ffi::OsString,
5
- fs::{create_dir_all, File},
6
- path::PathBuf,
7
-};
+use std::{ffi::OsString, fs::create_dir_all, path::PathBuf};
8
9
-use tempfile::{tempfile_in, TempDir};
+use tempfile::TempDir;
10
11
use once_cell::sync::Lazy;
12
@@ -31,7 +27,7 @@ pub fn tempdir() -> TempDir {
31
27
TempDir::with_prefix_in("composefs-test-", TMPDIR.as_os_str()).unwrap()
32
28
}
33
29
34
-/// Allocate a temporary file
35
-pub(crate) fn tempfile() -> File {
36
- tempfile_in(TMPDIR.as_os_str()).unwrap()
30
+#[cfg(test)]
+pub(crate) fn tempfile() -> std::fs::File {
+ tempfile::tempfile_in(TMPDIR.as_os_str()).unwrap()
37
0 commit comments