Skip to content

Commit dc1e377

Browse files
committed
Improve docs on rustsecp256k1_v0_4_1_context_create
In preparation for [someone] adding a `# Safety` section to this function, clean up the docs.
1 parent ad153d8 commit dc1e377

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

secp256k1-sys/src/lib.rs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -535,12 +535,14 @@ extern "C" {
535535

536536
/// A reimplementation of the C function `secp256k1_context_create` in rust.
537537
///
538-
/// This function allocates memory, the pointer should be deallocated using `secp256k1_context_destroy`
539-
/// A failure to do so will result in a memory leak.
538+
/// This function allocates memory, the pointer should be deallocated using
539+
/// `secp256k1_context_destroy`. Failure to do so will result in a memory leak.
540540
///
541-
/// This will create a secp256k1 raw context.
542-
// Returns: a newly created context object.
543-
// In: flags: which parts of the context to initialize.
541+
/// Input `flags` control which parts of the context to initialize.
542+
///
543+
/// # Returns
544+
///
545+
/// The newly created secp256k1 raw context.
544546
#[no_mangle]
545547
#[cfg(all(feature = "std", not(rust_secp_no_symbol_renaming)))]
546548
#[cfg_attr(docsrs, doc(cfg(all(feature = "std", not(rust_secp_no_symbol_renaming)))))]

0 commit comments

Comments
 (0)