summaryrefslogtreecommitdiffstats
path: root/src/fs/dir_action.rs
diff options
context:
space:
mode:
authorBenjamin Sago <ogham@bsago.me>2020-10-10 13:55:26 +0100
committerBenjamin Sago <ogham@bsago.me>2020-10-10 13:55:26 +0100
commit70a30ed683ecc88304c6b2d66b6d34d61a1dd072 (patch)
tree62ec6527de8bb9f824ebcc1b0028c551ec28f03d /src/fs/dir_action.rs
parent74d9f1402b9f0a26a796d0197e44c24c78696693 (diff)
The Selfening
This commit uses Clippy to fix all the 'use_self' warnings. Using Self instead of the type name has been good Rust style for a while now, and it's become the style I'm used to seeing.
Diffstat (limited to 'src/fs/dir_action.rs')
-rw-r--r--src/fs/dir_action.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/fs/dir_action.rs b/src/fs/dir_action.rs
index ce382ac..d72db88 100644
--- a/src/fs/dir_action.rs
+++ b/src/fs/dir_action.rs
@@ -41,7 +41,7 @@ impl DirAction {
/// Gets the recurse options, if this dir action has any.
pub fn recurse_options(&self) -> Option<RecurseOptions> {
match *self {
- DirAction::Recurse(o) => Some(o),
+ Self::Recurse(o) => Some(o),
_ => None,
}
}
@@ -49,8 +49,8 @@ impl DirAction {
/// Whether to treat directories as regular files or not.
pub fn treat_dirs_as_files(&self) -> bool {
match *self {
- DirAction::AsFile => true,
- DirAction::Recurse(o) => o.tree,
+ Self::AsFile => true,
+ Self::Recurse(o) => o.tree,
_ => false,
}
}