forked from mirror/async-std
feat: Add Default trait
This commit is contained in:
parent
33d2191cec
commit
6253e97717
2 changed files with 7 additions and 1 deletions
|
@ -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,
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue