From 031071d80e55fa4111c64d649d86b1a9fa16dba6 Mon Sep 17 00:00:00 2001 From: Pekka Enberg Date: Sun, 10 Sep 2023 12:41:07 +0300 Subject: [PATCH] Eliminate enum warning --- core/io/mod.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/core/io/mod.rs b/core/io/mod.rs index d4c082398..12dff5f9c 100644 --- a/core/io/mod.rs +++ b/core/io/mod.rs @@ -1,8 +1,5 @@ use anyhow::{Ok, Result}; -use std::cell::RefCell; -use std::io::{Read, Seek}; -use std::os::unix::io::AsRawFd; -use std::{fs::File, sync::Arc}; +use std::sync::Arc; #[cfg(all(feature = "fs", target_os = "linux"))] mod io_uring; @@ -12,6 +9,7 @@ mod syscall; /// I/O access method enum IOMethod { + #[cfg(not(feature = "fs"))] Memory, #[cfg(feature = "fs")] @@ -66,6 +64,7 @@ impl IO { let io = Arc::new(io_uring::IoUring::open(path)?); Ok(PageSource { io }) } + #[cfg(not(feature = "fs"))] IOMethod::Memory => { todo!(); }