]> git.lizzy.rs Git - rust.git/blobdiff - src/libstd/sys/unix/fs.rs
Rollup merge of #51786 - cuviper:stat64-pointers, r=Mark-Simulacrum
[rust.git] / src / libstd / sys / unix / fs.rs
index e186b115821649d37155da058a835f2bff6425b0..662a76d6725a68d7bb3493c7229330d446e1dd80 100644 (file)
@@ -803,7 +803,7 @@ pub fn stat(p: &Path) -> io::Result<FileAttr> {
     let p = cstr(p)?;
     let mut stat: stat64 = unsafe { mem::zeroed() };
     cvt(unsafe {
-        stat64(p.as_ptr(), &mut stat as *mut _ as *mut _)
+        stat64(p.as_ptr(), &mut stat)
     })?;
     Ok(FileAttr { stat: stat })
 }
@@ -812,7 +812,7 @@ pub fn lstat(p: &Path) -> io::Result<FileAttr> {
     let p = cstr(p)?;
     let mut stat: stat64 = unsafe { mem::zeroed() };
     cvt(unsafe {
-        lstat64(p.as_ptr(), &mut stat as *mut _ as *mut _)
+        lstat64(p.as_ptr(), &mut stat)
     })?;
     Ok(FileAttr { stat: stat })
 }