File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -72,7 +72,7 @@ pub fn info() {
72
72
pub fn info_string ( verbose : bool ) -> String {
73
73
let result: String ;
74
74
unsafe {
75
- let mut tmp: * mut c_char = 0 as * mut c_char ;
75
+ let mut tmp: * mut c_char = :: std :: ptr :: null_mut ( ) ;
76
76
let err_val = af_info_string ( & mut tmp, verbose) ;
77
77
HANDLE_ERROR ( AfError :: from ( err_val) ) ;
78
78
result = CStr :: from_ptr ( tmp) . to_string_lossy ( ) . into_owned ( ) ;
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ pub fn get_size(value: DType) -> usize {
32
32
33
33
/// Allocates space using Arrayfire allocator in host memory
34
34
pub fn alloc_host < T > ( elements : usize , _type : DType ) -> * const T {
35
- let ptr = 0 as * const T ;
35
+ let ptr: * const T = :: std :: ptr :: null ( ) ;
36
36
let bytes = ( elements * get_size ( _type) ) as DimT ;
37
37
unsafe {
38
38
let err_val = af_alloc_host ( & mut ( ptr as * const c_void ) , bytes) ;
You can’t perform that action at this time.
0 commit comments