makes clippy happy

This commit is contained in:
Tamo
2023-01-31 12:49:35 +01:00
parent 4b7b2d6a90
commit 6be9a828fa
2 changed files with 6 additions and 6 deletions

View File

@ -237,13 +237,13 @@ impl FromStr for AscDesc {
"desc" => Ok(AscDesc::Desc(field_name.to_string())),
_ => Err(()),
}
} else if text.starts_with("asc(") && text.ends_with(")") {
} else if text.starts_with("asc(") && text.ends_with(')') {
Ok(AscDesc::Asc(
text.strip_prefix("asc(").unwrap().strip_suffix(")").unwrap().to_string(),
text.strip_prefix("asc(").unwrap().strip_suffix(')').unwrap().to_string(),
))
} else if text.starts_with("desc(") && text.ends_with(")") {
} else if text.starts_with("desc(") && text.ends_with(')') {
Ok(AscDesc::Desc(
text.strip_prefix("desc(").unwrap().strip_suffix(")").unwrap().to_string(),
text.strip_prefix("desc(").unwrap().strip_suffix(')').unwrap().to_string(),
))
} else {
Err(())