mirror of
https://github.com/fafhrd91/actix-web
synced 2025-06-26 06:57:43 +02:00
refactor: address clippy warnings
This commit is contained in:
@ -154,15 +154,11 @@ impl<T: ResourcePath> Path<T> {
|
||||
None
|
||||
}
|
||||
|
||||
/// Get matched parameter by name.
|
||||
/// Returns matched parameter by name.
|
||||
///
|
||||
/// If keyed parameter is not available empty string is used as default value.
|
||||
pub fn query(&self, key: &str) -> &str {
|
||||
if let Some(s) = self.get(key) {
|
||||
s
|
||||
} else {
|
||||
""
|
||||
}
|
||||
self.get(key).unwrap_or_default()
|
||||
}
|
||||
|
||||
/// Return iterator to items in parameter container.
|
||||
|
Reference in New Issue
Block a user