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:
parent
4334d3c196
commit
3b9dfd6af0
6 changed files with 35 additions and 36 deletions
|
|
@ -11,5 +11,5 @@
|
|||
use std::io::FileType;
|
||||
|
||||
pub fn main() {
|
||||
let _ = FileType::TypeFile.clone();
|
||||
let _ = FileType::RegularFile.clone();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue