diff --git a/Cargo.toml b/Cargo.toml index 2b4578a..5f1616f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,7 +3,7 @@ authors = ["Kristoffer Ström ", "David Stainton "] edition = "2018" name = "appendix" -version = "0.2.0" +version = "0.2.1" description = "Append-only, on-disk key-value index" documentation = "https://docs.rs/appendix/" keywords = ["index", "datastructure"] diff --git a/src/lib.rs b/src/lib.rs index db44f31..b8149c0 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -58,8 +58,18 @@ pub struct Index { _marker: PhantomData<(K, V)>, } -unsafe impl Send for Index {} -unsafe impl Sync for Index {} +unsafe impl Send for Index +where + K: Send, + V: Send, +{ +} +unsafe impl Sync for Index +where + K: Sync, + V: Sync, +{ +} #[derive(Debug)] #[repr(C)]