feat: Add Default trait

This commit is contained in:
k-nasa 2019-10-01 16:52:10 +09:00
parent 33d2191cec
commit 6253e97717
2 changed files with 7 additions and 1 deletions

View file

@ -14,7 +14,7 @@ use crate::task::blocking;
///
/// [`os::unix::fs::DirBuilderExt`]: ../os/unix/fs/trait.DirBuilderExt.html
/// [`std::fs::DirBuilder`]: https://doc.rust-lang.org/std/fs/struct.DirBuilder.html
#[derive(Debug)]
#[derive(Debug, Default)]
pub struct DirBuilder {
/// Set to `true` if non-existent parent directories should be created.
recursive: bool,

View file

@ -290,6 +290,12 @@ impl OpenOptions {
}
}
impl Default for OpenOptions {
fn default() -> Self {
Self::new()
}
}
cfg_if! {
if #[cfg(feature = "docs")] {
use crate::os::unix::fs::OpenOptionsExt;