diff --git a/repro-problem/src/main.rs b/repro-problem/src/main.rs index 499e4029b2..047b73ff5f 100644 --- a/repro-problem/src/main.rs +++ b/repro-problem/src/main.rs @@ -1,4 +1,3 @@ -use page_cache::FileId; use virtual_file::VirtualFile; mod page_cache; @@ -7,7 +6,7 @@ mod virtual_file; fn main() { page_cache::init(10); - let x: Box + Send> = Box::new(async move { + tokio::spawn(async move { let cache = page_cache::get(); let res = cache diff --git a/repro-problem/src/virtual_file.rs b/repro-problem/src/virtual_file.rs index d9e8d500ba..34826a6dfc 100644 --- a/repro-problem/src/virtual_file.rs +++ b/repro-problem/src/virtual_file.rs @@ -15,12 +15,10 @@ use camino::{Utf8Path, Utf8PathBuf}; use once_cell::sync::OnceCell; use std::fs::{self, File}; use std::io::{Error, ErrorKind, Seek, SeekFrom}; -use std::os::fd::{AsFd, AsRawFd, BorrowedFd, FromRawFd, IntoRawFd, OwnedFd, RawFd}; +use std::os::fd::{AsRawFd, FromRawFd, OwnedFd, RawFd}; use std::os::unix::fs::FileExt; use std::sync::atomic::{AtomicBool, AtomicUsize, Ordering}; -use std::sync::Arc; use tokio::sync::{RwLock, RwLockReadGuard, RwLockWriteGuard}; -use tokio::time::Instant; use utils::fs_ext; ///