From bc773fbdce3112b3c370768db13824e401c1b692 Mon Sep 17 00:00:00 2001 From: Andrew Poelstra Date: Tue, 24 Jul 2018 21:18:03 +0000 Subject: [PATCH] add comments for Sync/Send impl --- src/lib.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index 187054f..c1234a0 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -402,7 +402,9 @@ pub struct Secp256k1 { phantom: PhantomData } +// The underlying secp context does not contain any references to memory it does not own unsafe impl Send for Secp256k1 {} +// The API does not permit any mutation of `Secp256k1` objects except through `&mut` references unsafe impl Sync for Secp256k1 {} impl Clone for Secp256k1 {