Skip to content

Commit 536102e

Browse files
committed
It panics instead of returning NULL
1 parent fce9732 commit 536102e

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

rust/rubydex-sys/src/signature_api.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,15 +62,14 @@ pub struct SignatureArray {
6262
}
6363

6464
/// Returns a newly allocated array of signatures for the given method definition id.
65-
/// Returns NULL if the definition is not a method definition.
6665
/// Caller must free the returned pointer with `rdx_definition_signatures_free`.
6766
///
6867
/// # Safety
6968
/// - `pointer` must be a valid pointer previously returned by `rdx_graph_new`.
7069
/// - `definition_id` must be a valid definition id.
7170
///
7271
/// # Panics
73-
/// This function will panic if a definition or document cannot be found.
72+
/// Panics if `definition_id` does not exist or is not a `MethodDefinition`.
7473
#[unsafe(no_mangle)]
7574
pub unsafe extern "C" fn rdx_definition_signatures(pointer: GraphPointer, definition_id: u64) -> *mut SignatureArray {
7675
with_graph(pointer, |graph| {

0 commit comments

Comments
 (0)