Skip to content

Commit 37c9c61

Browse files
committed
fix(test): move import to where its needed
The usesite of this import was behind a cfg, so some feature combos printed a warning about unused imports. Signed-off-by: Patrick Roy <[email protected]>
1 parent a163af4 commit 37c9c61

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/mmap/mod.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,6 @@ mod tests {
226226
use crate::{Bytes, GuestMemory, GuestMemoryError};
227227

228228
use std::io::Write;
229-
use std::mem;
230229
#[cfg(feature = "rawfd")]
231230
use std::{fs::File, path::Path};
232231
use vmm_sys_util::tempfile::TempFile;
@@ -432,6 +431,8 @@ mod tests {
432431
#[test]
433432
#[cfg(feature = "rawfd")]
434433
fn read_to_and_write_from_mem() {
434+
use std::mem;
435+
435436
let f = TempFile::new().unwrap().into_file();
436437
f.set_len(0x400).unwrap();
437438

0 commit comments

Comments
 (0)