]> git.lizzy.rs Git - rust.git/commit
Clean up FileType enum following enum namespacing
authorBen S <ogham@bsago.me>
Mon, 24 Nov 2014 19:04:54 +0000 (19:04 +0000)
committerBen S <ogham@bsago.me>
Mon, 24 Nov 2014 23:01:15 +0000 (23:01 +0000)
commit3b9dfd6af04ca008a4c2ef13b7fd2e8433dc473f
treef07344845ab95802de42397fd1c5827c292fe25e
parent4334d3c19699c65ba8cb354f84fa40e4b678bfa6
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]
src/librustc_back/fs.rs
src/libstd/io/fs.rs
src/libstd/io/mod.rs
src/libstd/sys/unix/fs.rs
src/libstd/sys/windows/fs.rs
src/test/run-pass/issue-18619.rs