Clean up FileType enum following enum namespacing

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.

[breaking-change]
This commit is contained in:
Ben S 2014-11-24 19:04:54 +00:00
parent 4334d3c196
commit 3b9dfd6af0
6 changed files with 35 additions and 36 deletions

View file

@ -11,5 +11,5 @@
use std::io::FileType;
pub fn main() {
let _ = FileType::TypeFile.clone();
let _ = FileType::RegularFile.clone();
}