Skip to content

Commit

Permalink
run cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
auronandace authored and meain committed Aug 26, 2021
1 parent e738de7 commit 62b1eec
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 9 deletions.
3 changes: 1 addition & 2 deletions src/flags/color.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,7 @@ impl Configurable<Self> for ColorOption {
return Some(Self::Never);
}

config.color.as_ref()
.map(|color| color.when)
config.color.as_ref().map(|color| color.when)
}

fn from_environment() -> Option<Self> {
Expand Down
3 changes: 1 addition & 2 deletions src/flags/dereference.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ impl Configurable<Self> for Dereference {
/// If the `Config::dereference` has value, this returns its value
/// as the value of the `Dereference`, in a [Some], Otherwise this returns [None].
fn from_config(config: &Config) -> Option<Self> {
config.dereference.as_ref()
.map(|deref| Self(*deref))
config.dereference.as_ref().map(|deref| Self(*deref))
}
}

Expand Down
3 changes: 1 addition & 2 deletions src/flags/indicators.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ impl Configurable<Self> for Indicators {
/// this returns its value as the value of the `Indicators`, in a [Some].
/// Otherwise this returns [None].
fn from_config(config: &Config) -> Option<Self> {
config.indicators.as_ref()
.map(|ind| Self(*ind))
config.indicators.as_ref().map(|ind| Self(*ind))
}
}

Expand Down
4 changes: 3 additions & 1 deletion src/flags/symlink_arrow.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ impl Configurable<Self> for SymlinkArrow {
/// returns its value as the value of the `SymlinkArrow`, in a [Some].
/// Otherwise this returns [None].
fn from_config(config: &Config) -> Option<Self> {
config.symlink_arrow.as_ref()
config
.symlink_arrow
.as_ref()
.map(|arrow| SymlinkArrow(arrow.to_string()))
}
}
Expand Down
3 changes: 1 addition & 2 deletions src/meta/symlink.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,7 @@ impl<'a> From<&'a Path> for SymLink {

impl SymLink {
pub fn symlink_string(&self) -> Option<String> {
self.target.as_ref()
.map(|target| target.to_string())
self.target.as_ref().map(|target| target.to_string())
}

pub fn render(&self, colors: &Colors, flag: &Flags) -> ColoredString {
Expand Down

0 comments on commit 62b1eec

Please sign in to comment.