Skip to content

Commit 5a7cede

Browse files
committed
doc: Fix preallocated memory grammar
The grammar on structs that implement `Context` using preallocated memory is slightly incorrect. Attempt to improve the grammar.
1 parent 5a54694 commit 5a7cede

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/context.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,19 +76,19 @@ pub trait Signing: Context {}
7676
/// Marker trait for indicating that an instance of `Secp256k1` can be used for verification.
7777
pub trait Verification: Context {}
7878

79-
/// Represents the set of capabilities needed for signing with a user preallocated memory.
79+
/// Represents the set of capabilities needed for signing (preallocated memory).
8080
#[derive(Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
8181
pub struct SignOnlyPreallocated<'buf> {
8282
phantom: PhantomData<&'buf ()>,
8383
}
8484

85-
/// Represents the set of capabilities needed for verification with a user preallocated memory.
85+
/// Represents the set of capabilities needed for verification (preallocated memory).
8686
#[derive(Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
8787
pub struct VerifyOnlyPreallocated<'buf> {
8888
phantom: PhantomData<&'buf ()>,
8989
}
9090

91-
/// Represents the set of all capabilities with a user preallocated memory.
91+
/// Represents the set of all capabilities (preallocated memory).
9292
#[derive(Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
9393
pub struct AllPreallocated<'buf> {
9494
phantom: PhantomData<&'buf ()>,
@@ -301,7 +301,7 @@ unsafe impl<'buf> Context for AllPreallocated<'buf> {
301301
}
302302

303303
impl<'buf, C: Context + 'buf> Secp256k1<C> {
304-
/// Lets you create a context with preallocated buffer in a generic manner(sign/verify/all)
304+
/// Lets you create a context with a preallocated buffer in a generic manner(sign/verify/all).
305305
pub fn preallocated_gen_new(buf: &'buf mut [AlignedType]) -> Result<Secp256k1<C>, Error> {
306306
#[cfg(target_arch = "wasm32")]
307307
ffi::types::sanity_checks_for_wasm();

0 commit comments

Comments
 (0)