Skip to content

Commit

Permalink
style: Make clippy happy
Browse files Browse the repository at this point in the history
  • Loading branch information
epage committed Sep 26, 2022
1 parent 31f9234 commit bd6b67c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 25 deletions.
2 changes: 1 addition & 1 deletion src/builder/str.rs
Expand Up @@ -131,7 +131,7 @@ impl AsRef<[u8]> for Str {
impl AsRef<std::ffi::OsStr> for Str {
#[inline]
fn as_ref(&self) -> &std::ffi::OsStr {
(&**self).as_ref()
(**self).as_ref()
}
}

Expand Down
28 changes: 4 additions & 24 deletions src/builder/value_parser.rs
Expand Up @@ -2074,10 +2074,7 @@ pub mod via_prelude {
fn value_parser(&self) -> _AnonymousValueParser {
_AnonymousValueParser(
OsStringValueParser::new()
.map(|s| {
let output = FromOsString::from(s);
output
})
.map(|s| FromOsString::from(s))
.into(),
)
}
Expand All @@ -2095,10 +2092,7 @@ pub mod via_prelude {
fn value_parser(&self) -> _AnonymousValueParser {
_AnonymousValueParser(
OsStringValueParser::new()
.map(|s| {
let output = FromOsStr::from(&s);
output
})
.map(|s| FromOsStr::from(&s))
.into(),
)
}
Expand All @@ -2113,14 +2107,7 @@ pub mod via_prelude {
FromString: From<String> + std::any::Any + Clone + Send + Sync + 'static,
{
fn value_parser(&self) -> _AnonymousValueParser {
_AnonymousValueParser(
StringValueParser::new()
.map(|s| {
let output = FromString::from(s);
output
})
.into(),
)
_AnonymousValueParser(StringValueParser::new().map(|s| FromString::from(s)).into())
}
}

Expand All @@ -2133,14 +2120,7 @@ pub mod via_prelude {
FromStr: for<'s> From<&'s str> + std::any::Any + Clone + Send + Sync + 'static,
{
fn value_parser(&self) -> _AnonymousValueParser {
_AnonymousValueParser(
StringValueParser::new()
.map(|s| {
let output = FromStr::from(&s);
output
})
.into(),
)
_AnonymousValueParser(StringValueParser::new().map(|s| FromStr::from(&s)).into())
}
}

Expand Down

0 comments on commit bd6b67c

Please sign in to comment.