|
|
@@ -30,10 +30,7 @@ impl SortField {
|
|
|
/// Returns the default sort field if none is given, or `Err` if the
|
|
|
/// value doesn’t correspond to a sort field we know about.
|
|
|
fn deduce(matches: &MatchedFlags<'_>) -> Result<Self, OptionsError> {
|
|
|
- let word = match matches.get(&flags::SORT)? {
|
|
|
- Some(w) => w,
|
|
|
- None => return Ok(Self::default()),
|
|
|
- };
|
|
|
+ let Some(word) = matches.get(&flags::SORT)? else { return Ok(Self::default()) };
|
|
|
|
|
|
// Get String because we can’t match an OsStr
|
|
|
let word = match word.to_str() {
|