mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-20 04:13:07 +02:00
Fix warning about unused method (#3488)
fix warning about unused method
This commit is contained in:
parent
bba010c307
commit
161463deec
1 changed files with 1 additions and 14 deletions
|
@ -83,7 +83,7 @@ pub(crate) trait PassByPointer: Sized {
|
|||
/// # Safety
|
||||
///
|
||||
/// - arg must not be NULL
|
||||
/// - arg must be a value returned from Box::into_raw (via return_ptr or ptr_to_arg_out)
|
||||
/// - arg must be a value returned from Box::into_raw (via return_ptr)
|
||||
/// - arg becomes invalid and must not be used after this call
|
||||
unsafe fn take_from_ptr_arg(arg: *mut Self) -> Self {
|
||||
debug_assert!(!arg.is_null());
|
||||
|
@ -127,19 +127,6 @@ pub(crate) trait PassByPointer: Sized {
|
|||
unsafe fn return_ptr(self) -> *mut Self {
|
||||
Box::into_raw(Box::new(self))
|
||||
}
|
||||
|
||||
/// Return a value to C, transferring ownership, via an "output parameter".
|
||||
///
|
||||
/// # Safety
|
||||
///
|
||||
/// - the caller must ensure that the value is eventually freed
|
||||
/// - arg_out must not be NULL
|
||||
/// - arg_out must point to valid, properly aligned memory for a pointer value
|
||||
unsafe fn ptr_to_arg_out(self, arg_out: *mut *mut Self) {
|
||||
debug_assert!(!arg_out.is_null());
|
||||
// SAFETY: see docstring
|
||||
unsafe { *arg_out = self.return_ptr() };
|
||||
}
|
||||
}
|
||||
|
||||
/// Support for C lists of objects referenced by value.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue