@@ -118,18 +118,15 @@ pub unsafe fn own_back<T>(pointer: *mut T) -> Result<T, crate::error::PointerErr
118
118
return Ok ( * boxed) ;
119
119
}
120
120
121
- /// Reference to a object but without back to own it.
122
- ///
123
- /// That's the difference with [`own_back<T>()`], you must
124
- /// use [`own_back<T>()`] to own it again and it will be dropped.
121
+ /// Reference to a object but without to own it.
125
122
///
126
123
/// # Errors
127
124
///
128
125
/// The pointer must be not null as it is an obvious invalid pointer.
129
126
///
130
127
/// # Safety
131
128
///
132
- /// Invalid pointer or call it twice could cause an undefined behavior or heap error and a crash.
129
+ /// Invalid pointer could cause an undefined behavior or heap error and a crash.
133
130
#[ inline]
134
131
pub unsafe fn object < ' a , T > ( pointer : * const T ) -> Result < & ' a T , crate :: error:: PointerError > {
135
132
null_error_check ( pointer) ?;
@@ -140,16 +137,13 @@ pub unsafe fn object<'a, T>(pointer: *const T) -> Result<&'a T, crate::error::Po
140
137
141
138
/// Mutable reference to a object but without back to own it.
142
139
///
143
- /// That's the difference with [`own_back<T>()`], you must
144
- /// use [`own_back<T>()`] to own it again and it will be dropped.
145
- ///
146
140
/// # Errors
147
141
///
148
142
/// The pointer must be not null as it is an obvious invalid pointer.
149
143
///
150
144
/// # Safety
151
145
///
152
- /// Invalid pointer or call it twice could cause an undefined behavior or heap error and a crash.
146
+ /// Invalid pointer could cause an undefined behavior or heap error and a crash.
153
147
#[ inline]
154
148
pub unsafe fn mut_object < ' a , T > ( pointer : * mut T ) -> Result < & ' a mut T , crate :: error:: PointerError > {
155
149
null_error_check ( pointer) ?;
0 commit comments