diff options
author | Victor Song <vms2@rice.edu> | 2022-09-30 23:15:53 -0400 |
---|---|---|
committer | Victor Song <vms2@rice.edu> | 2023-02-24 18:29:37 -0500 |
commit | 1f409793ae8eb0aa39dabc1bfb09333c20e2fee1 (patch) | |
tree | 627f4f64f4ae9e7bce4f5853fd0c359f75ffa456 | |
parent | 19601267cf425d3e5fbc99788834f5b5dda0056d (diff) |
Use `pointer::cast` instead of `as` pointer casts
-rw-r--r-- | src/fs/feature/xattr.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/fs/feature/xattr.rs b/src/fs/feature/xattr.rs index 65b8c95..192371c 100644 --- a/src/fs/feature/xattr.rs +++ b/src/fs/feature/xattr.rs @@ -167,7 +167,7 @@ mod lister { unsafe { listxattr( c_path.as_ptr(), - buf.as_mut_ptr() as *mut c_char, + buf.as_mut_ptr().cast::<c_char>(), bufsize as size_t, self.c_flags, ) @@ -178,7 +178,7 @@ mod lister { unsafe { getxattr( c_path.as_ptr(), - buf.as_ptr() as *const c_char, + buf.as_ptr().cast::<c_char>(), ptr::null_mut(), 0, 0, |