apply clippy suggestions
This commit is contained in:
13 files changed
+18
-22
No files matched your search
@@ -13,10 +13,10 @@ pub fn resolve_name(
|
||||
parameters: &HashMap<Name, String>,
|
||||
) -> Option<String> {
|
||||
debug_assert!(
|
||||
map.contains_key(&name),
|
||||
map.contains_key(name),
|
||||
"named navigation to unknown name: {name}"
|
||||
);
|
||||
let target = map.get(&name)?;
|
||||
let target = map.get(name)?;
|
||||
|
||||
let mut res = String::new();
|
||||
for t in target {
|
||||
|
||||
@@ -27,7 +27,7 @@ pub fn resolve_target(
|
||||
if !s.starts_with('?') {
|
||||
p += "?";
|
||||
}
|
||||
p += &s;
|
||||
p += s;
|
||||
}
|
||||
#[cfg(feature = "serde")]
|
||||
Query::List(l) => {
|
||||
@@ -44,8 +44,8 @@ pub fn resolve_target(
|
||||
|
||||
p
|
||||
})
|
||||
.map(|p| Either::Left(p))
|
||||
.unwrap_or(Either::Right(name.clone())),
|
||||
.map(Either::Left)
|
||||
.unwrap_or_else(|| Either::Right(name.clone())),
|
||||
),
|
||||
NavigationTarget::External(e) => Either::Right(e.to_string()),
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user