]> git.lizzy.rs Git - rust.git/blobdiff - library/std/src/sys/windows/fs.rs
Rollup merge of #89876 - AlexApps99:const_ops, r=oli-obk
[rust.git] / library / std / src / sys / windows / fs.rs
index 064a3559739a5c26023f544e80042c4e0df957b4..9859000c8d417480f97823bc6c585341d1a92bfc 100644 (file)
@@ -358,7 +358,7 @@ pub fn file_attr(&self) -> io::Result<FileAttr> {
             let mut info: c::FILE_BASIC_INFO = mem::zeroed();
             let size = mem::size_of_val(&info);
             cvt(c::GetFileInformationByHandleEx(
-                self.handle.raw(),
+                self.handle.as_raw_handle(),
                 c::FileBasicInfo,
                 &mut info as *mut _ as *mut libc::c_void,
                 size as c::DWORD,
@@ -386,7 +386,7 @@ pub fn file_attr(&self) -> io::Result<FileAttr> {
             let mut info: c::FILE_STANDARD_INFO = mem::zeroed();
             let size = mem::size_of_val(&info);
             cvt(c::GetFileInformationByHandleEx(
-                self.handle.raw(),
+                self.handle.as_raw_handle(),
                 c::FileStandardInfo,
                 &mut info as *mut _ as *mut libc::c_void,
                 size as c::DWORD,
@@ -559,7 +559,7 @@ fn into_inner(self) -> Handle {
 
 impl FromInner<Handle> for File {
     fn from_inner(handle: Handle) -> File {
-        File { handle: handle }
+        File { handle }
     }
 }
 
@@ -673,7 +673,7 @@ pub fn set_readonly(&mut self, readonly: bool) {
 
 impl FileType {
     fn new(attrs: c::DWORD, reparse_tag: c::DWORD) -> FileType {
-        FileType { attributes: attrs, reparse_tag: reparse_tag }
+        FileType { attributes: attrs, reparse_tag }
     }
     pub fn is_dir(&self) -> bool {
         !self.is_symlink() && self.is_directory()