@@ -17,7 +17,7 @@ mod linux {
1717 /// Allocate and initialise a new thread context.
1818 ///
1919 /// Returns a non-null owned handle that must eventually be released with
20- /// `ddog_otel_thread_ctx_drop `.
20+ /// `ddog_otel_thread_ctx_free `.
2121 #[ no_mangle]
2222 pub extern "C" fn ddog_otel_thread_ctx_new (
2323 trace_id : & [ u8 ; 16 ] ,
@@ -27,17 +27,17 @@ mod linux {
2727 ThreadContext :: new ( * trace_id, * span_id, * local_root_span_id, & [ ] ) . into_ptr ( )
2828 }
2929
30- /// Release an owned thread context.
30+ /// Free an owned thread context.
3131 ///
3232 /// # Safety
3333 ///
3434 /// `ctx` must be a valid non-null pointer obtained from `ddog_otel_thread_ctx_new` or
3535 /// `ddog_otel_thread_ctx_detach`, and must not be used after this call. In particular, `ctx`
3636 /// must not be currently attached to a thread.
3737 #[ no_mangle]
38- pub unsafe extern "C" fn ddog_otel_thread_ctx_drop ( ctx : * mut ThreadContextRecord ) {
38+ pub unsafe extern "C" fn ddog_otel_thread_ctx_free ( ctx : * mut ThreadContextRecord ) {
3939 if let Some ( ctx) = NonNull :: new ( ctx) {
40- drop ( ThreadContext :: from_ptr ( ctx) ) ;
40+ let _ = ThreadContext :: from_ptr ( ctx) ;
4141 }
4242 }
4343
@@ -85,7 +85,7 @@ mod linux {
8585 /// Remove the currently attached context from the TLS slot.
8686 ///
8787 /// Returns the detached context (caller now owns it and must release it with
88- /// `ddog_otel_thread_ctx_drop `), or null if the slot was empty.
88+ /// `ddog_otel_thread_ctx_free `), or null if the slot was empty.
8989 #[ no_mangle]
9090 pub extern "C" fn ddog_otel_thread_ctx_detach ( ) -> Option < NonNull < ThreadContextRecord > > {
9191 ThreadContext :: detach ( ) . map ( ThreadContext :: into_ptr)
0 commit comments