@@ -79,10 +79,10 @@ pub unsafe trait Context: private::Sealed {
7979 unsafe fn deallocate ( ptr : * mut u8 , size : usize ) ;
8080}
8181
82- /// Marker trait for indicating that an instance of `Secp256k1` can be used for signing.
82+ /// Marker trait for indicating that an instance of [ `Secp256k1`] can be used for signing.
8383pub trait Signing : Context { }
8484
85- /// Marker trait for indicating that an instance of `Secp256k1` can be used for verification.
85+ /// Marker trait for indicating that an instance of [ `Secp256k1`] can be used for verification.
8686pub trait Verification : Context { }
8787
8888/// Represents the set of capabilities needed for signing (preallocated memory).
@@ -247,8 +247,8 @@ mod alloc_only {
247247 impl Secp256k1 < VerifyOnly > {
248248 /// Creates a new Secp256k1 context that can only be used for verification.
249249 ///
250- /// If `rand-std` feature is enabled, context will have been randomized using `thread_rng`.
251- /// If `rand-std` feature is not enabled please consider randomizing the context (see docs
250+ /// * If `rand-std` feature is enabled, context will have been randomized using `thread_rng`.
251+ /// * If `rand-std` feature is not enabled please consider randomizing the context (see docs
252252 /// for `Secp256k1::gen_new()`).
253253 pub fn verification_only ( ) -> Secp256k1 < VerifyOnly > { Secp256k1 :: gen_new ( ) }
254254 }
@@ -307,7 +307,7 @@ unsafe impl<'buf> Context for AllPreallocated<'buf> {
307307}
308308
309309impl < ' buf , C : Context + ' buf > Secp256k1 < C > {
310- /// Lets you create a context with a preallocated buffer in a generic manner(sign/verify/all).
310+ /// Lets you create a context with a preallocated buffer in a generic manner (sign/verify/all).
311311 pub fn preallocated_gen_new ( buf : & ' buf mut [ AlignedType ] ) -> Result < Secp256k1 < C > , Error > {
312312 #[ cfg( target_arch = "wasm32" ) ]
313313 ffi:: types:: sanity_checks_for_wasm ( ) ;
@@ -329,7 +329,7 @@ impl<'buf, C: Context + 'buf> Secp256k1<C> {
329329}
330330
331331impl < ' buf > Secp256k1 < AllPreallocated < ' buf > > {
332- /// Creates a new Secp256k1 context with all capabilities
332+ /// Creates a new Secp256k1 context with all capabilities.
333333 pub fn preallocated_new (
334334 buf : & ' buf mut [ AlignedType ] ,
335335 ) -> Result < Secp256k1 < AllPreallocated < ' buf > > , Error > {
@@ -338,7 +338,7 @@ impl<'buf> Secp256k1<AllPreallocated<'buf>> {
338338 /// Uses the ffi `secp256k1_context_preallocated_size` to check the memory size needed for a context.
339339 pub fn preallocate_size ( ) -> usize { Self :: preallocate_size_gen ( ) }
340340
341- /// Create a context from a raw context.
341+ /// Creates a context from a raw context.
342342 ///
343343 /// # Safety
344344 /// This is highly unsafe, due to the number of conditions that aren't checked.
@@ -372,9 +372,10 @@ impl<'buf> Secp256k1<SignOnlyPreallocated<'buf>> {
372372 #[ inline]
373373 pub fn preallocate_signing_size ( ) -> usize { Self :: preallocate_size_gen ( ) }
374374
375- /// Create a context from a raw context.
375+ /// Creates a context from a raw context.
376376 ///
377377 /// # Safety
378+ ///
378379 /// This is highly unsafe, due to the number of conditions that aren't checked.
379380 /// * `raw_ctx` needs to be a valid Secp256k1 context pointer.
380381 /// that was generated by *exactly* the same code/version of the libsecp256k1 used here.
@@ -406,9 +407,10 @@ impl<'buf> Secp256k1<VerifyOnlyPreallocated<'buf>> {
406407 #[ inline]
407408 pub fn preallocate_verification_size ( ) -> usize { Self :: preallocate_size_gen ( ) }
408409
409- /// Create a context from a raw context.
410+ /// Creates a context from a raw context.
410411 ///
411412 /// # Safety
413+ ///
412414 /// This is highly unsafe, due to the number of conditions that aren't checked.
413415 /// * `raw_ctx` needs to be a valid Secp256k1 context pointer.
414416 /// that was generated by *exactly* the same code/version of the libsecp256k1 used here.
0 commit comments