File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 1
1
//! Opaque pointers errors.
2
2
3
- use std :: str:: Utf8Error ;
3
+ use core :: str:: Utf8Error ;
4
4
5
5
/// Errors that can be detected by the functions of this crate.
6
6
///
@@ -16,8 +16,8 @@ pub enum PointerError {
16
16
Utf8Error ( Utf8Error ) ,
17
17
}
18
18
19
- impl std :: fmt:: Display for PointerError {
20
- fn fmt ( & self , f : & mut std :: fmt:: Formatter ) -> std :: fmt:: Result {
19
+ impl core :: fmt:: Display for PointerError {
20
+ fn fmt ( & self , f : & mut core :: fmt:: Formatter ) -> core :: fmt:: Result {
21
21
match * self {
22
22
Self :: Null => {
23
23
write ! ( f, "dereference a null pointer will produce a crash" )
Original file line number Diff line number Diff line change @@ -95,7 +95,7 @@ pub fn raw<T>(data: T) -> *mut T {
95
95
#[ cfg( any( feature = "alloc" , feature = "std" ) ) ]
96
96
#[ inline]
97
97
pub unsafe fn free < T > ( pointer : * mut T ) {
98
- std :: mem:: drop ( own_back ( pointer) ) ;
98
+ core :: mem:: drop ( own_back ( pointer) ) ;
99
99
}
100
100
101
101
/// Opposite of [`raw<T>()`], to use Rust's ownership as usually.
You can’t perform that action at this time.
0 commit comments