diff --git a/core/fast_lock.rs b/core/fast_lock.rs index 8abda6a17..a02d617ba 100644 --- a/core/fast_lock.rs +++ b/core/fast_lock.rs @@ -34,7 +34,6 @@ impl DerefMut for SpinLockGuard<'_, T> { } } -unsafe impl Send for SpinLock {} unsafe impl Sync for SpinLock {} impl SpinLock { diff --git a/core/io/memory.rs b/core/io/memory.rs index c69d87dcf..fc0549ca7 100644 --- a/core/io/memory.rs +++ b/core/io/memory.rs @@ -12,7 +12,6 @@ use tracing::debug; pub struct MemoryIO { files: Arc>>>, } -unsafe impl Send for MemoryIO {} // TODO: page size flag const PAGE_SIZE: usize = 4096; @@ -76,7 +75,7 @@ pub struct MemoryFile { pages: UnsafeCell>, size: Cell, } -unsafe impl Send for MemoryFile {} + unsafe impl Sync for MemoryFile {} impl File for MemoryFile { diff --git a/core/io/unix.rs b/core/io/unix.rs index a3cfd6f2f..b0d47f30f 100644 --- a/core/io/unix.rs +++ b/core/io/unix.rs @@ -17,9 +17,6 @@ use tracing::{instrument, trace, Level}; pub struct UnixIO {} -unsafe impl Send for UnixIO {} -unsafe impl Sync for UnixIO {} - impl UnixIO { #[cfg(feature = "fs")] pub fn new() -> Result { @@ -128,8 +125,6 @@ impl IO for UnixIO { pub struct UnixFile { file: Arc>, } -unsafe impl Send for UnixFile {} -unsafe impl Sync for UnixFile {} impl File for UnixFile { fn lock_file(&self, exclusive: bool) -> Result<()> { diff --git a/core/storage/database.rs b/core/storage/database.rs index e7aceebbf..3cbc42b9f 100644 --- a/core/storage/database.rs +++ b/core/storage/database.rs @@ -88,11 +88,6 @@ pub struct DatabaseFile { file: Arc, } -#[cfg(feature = "fs")] -unsafe impl Send for DatabaseFile {} -#[cfg(feature = "fs")] -unsafe impl Sync for DatabaseFile {} - #[cfg(feature = "fs")] impl DatabaseStorage for DatabaseFile { #[instrument(skip_all, level = Level::DEBUG)]