File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ fn panic_if_null<T>(pointer: *const T) {
34
34
/// Convert type to raw pointer.
35
35
#[ inline]
36
36
pub fn raw < T > ( data : T ) -> * mut T {
37
- Box :: into_raw ( Box :: new ( data) )
37
+ return Box :: into_raw ( Box :: new ( data) ) ;
38
38
}
39
39
40
40
/// Free pointer to type.
@@ -65,7 +65,7 @@ pub unsafe fn own_back<T>(pointer: *mut T) -> T {
65
65
panic_if_null ( pointer) ;
66
66
// CAUTION: this is unsafe
67
67
let boxed = Box :: from_raw ( pointer) ;
68
- * boxed
68
+ return * boxed;
69
69
}
70
70
71
71
/// Convert raw pointer to type to type reference.
@@ -77,7 +77,7 @@ pub unsafe fn own_back<T>(pointer: *mut T) -> T {
77
77
pub unsafe fn object < ' a , T > ( pointer : * const T ) -> & ' a T {
78
78
panic_if_null ( pointer) ;
79
79
// CAUTION: this is unsafe
80
- & * pointer
80
+ return & * pointer;
81
81
}
82
82
83
83
/// Convert raw pointer to type into type mutable reference.
@@ -89,5 +89,5 @@ pub unsafe fn object<'a, T>(pointer: *const T) -> &'a T {
89
89
pub unsafe fn mut_object < ' a , T > ( pointer : * mut T ) -> & ' a mut T {
90
90
panic_if_null ( pointer) ;
91
91
// CAUTION: this is unsafe
92
- & mut * pointer
92
+ return & mut * pointer;
93
93
}
You can’t perform that action at this time.
0 commit comments