You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
std::os::unix::fs::FileTypeExt only exists on Unix platforms, and is deliberately a trait (rather than conditionally-compiled inherent methods) so that you have to import it to use it, and see (with the os::unix bit) that you’re using something platform-specific. I don’t know if the same separation would be possible with enum variants.
Activity
alexcrichton commentedon Sep 17, 2015
Nominating for 1.5 resolution
lambda-fairy commentedon Sep 19, 2015
Since the file types are mutually exclusive, would it be better to return an enum instead?
Though I think the primary use case would be "is the type of this == X" so the current API would be fine.
SimonSapin commentedon Sep 19, 2015
std::os::unix::fs::FileTypeExtonly exists on Unix platforms, and is deliberately a trait (rather than conditionally-compiled inherent methods) so that you have to import it to use it, and see (with theos::unixbit) that you’re using something platform-specific. I don’t know if the same separation would be possible with enum variants.alexcrichton commentedon Sep 24, 2015
This issue is now entering its cycle-long FCP for stabilization in 1.5
alexcrichton commentedon Oct 22, 2015
The libs team discussed this today and the decision was to stabilize.
std: Stabilize library APIs for 1.5
Auto merge of #29254 - alexcrichton:stabilize-1.5, r=brson