Skip to content

Commit 3e6768b

Browse files
committed
Minor docs
1 parent 9e17fc9 commit 3e6768b

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

‎src/base.rs‎

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,21 +70,18 @@ pub trait FnPtr:
7070
/// Constructs an instance from an address.
7171
///
7272
/// # Safety
73-
/// This function is unsafe because it can not check if the argument points to a function
74-
/// of the correct type.
73+
/// The given pointer has to point to a function of the correct type.
7574
#[must_use]
7675
unsafe fn from_addr(addr: usize) -> Self {
7776
unsafe { Self::from_ptr(addr as UntypedFnPtr) }
7877
}
79-
8078
/// Returns a untyped function pointer for this function.
8179
#[must_use]
8280
fn as_ptr(&self) -> UntypedFnPtr;
8381
/// Constructs an instance from an untyped function pointer.
8482
///
8583
/// # Safety
86-
/// This function is unsafe because it can not check if the argument points to a function
87-
/// of the correct type.
84+
/// The given pointer has to point to a function of the correct type.
8885
#[must_use]
8986
#[allow(clippy::missing_safety_doc)] // false positive?
9087
unsafe fn from_ptr(ptr: UntypedFnPtr) -> Self;

0 commit comments

Comments
 (0)