about summary refs log tree commit diff
path: root/src/libstd/sys/windows
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2014-11-26 09:44:21 -0800
committerAlex Crichton <alex@alexcrichton.com>2014-11-26 16:49:35 -0800
commit3649c2a39f26e59c73e96bc7e6bf7d7d025b6be3 (patch)
tree1a85c5f46c9d3fd3d160197e2b1ea2adf286a255 /src/libstd/sys/windows
parent52d4526e1bea858f08014cb48bee0ad02059ab63 (diff)
parent3b9dfd6af04ca008a4c2ef13b7fd2e8433dc473f (diff)
downloadrust-3649c2a39f26e59c73e96bc7e6bf7d7d025b6be3.tar.gz
rust-3649c2a39f26e59c73e96bc7e6bf7d7d025b6be3.zip
rollup merge of #19273: ogham/rename-file-types
All of the enum components had a redundant 'Type' specifier: TypeSymlink, TypeDirectory, TypeFile. This change removes them, replacing them with a namespace: FileType::Symlink, FileType::Directory, and FileType::RegularFile.

RegularFile is used instead of just File, as File by itself could be mistakenly thought of as referring to the struct.

Part of #19253.
Diffstat (limited to 'src/libstd/sys/windows')
-rw-r--r--src/libstd/sys/windows/fs.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/libstd/sys/windows/fs.rs b/src/libstd/sys/windows/fs.rs
index b881eb2d495..9c4ffb926b5 100644
--- a/src/libstd/sys/windows/fs.rs
+++ b/src/libstd/sys/windows/fs.rs
@@ -407,12 +407,12 @@ fn mkstat(stat: &libc::stat) -> FileStat {
     FileStat {
         size: stat.st_size as u64,
         kind: match (stat.st_mode as libc::c_int) & libc::S_IFMT {
-            libc::S_IFREG => io::TypeFile,
-            libc::S_IFDIR => io::TypeDirectory,
-            libc::S_IFIFO => io::TypeNamedPipe,
-            libc::S_IFBLK => io::TypeBlockSpecial,
-            libc::S_IFLNK => io::TypeSymlink,
-            _ => io::TypeUnknown,
+            libc::S_IFREG => io::FileType::RegularFile,
+            libc::S_IFDIR => io::FileType::Directory,
+            libc::S_IFIFO => io::FileType::NamedPipe,
+            libc::S_IFBLK => io::FileType::BlockSpecial,
+            libc::S_IFLNK => io::FileType::Symlink,
+            _ => io::FileType::Unknown,
         },
         perm: FilePermission::from_bits_truncate(stat.st_mode as u32),
         created: stat.st_ctime as u64,