Bug 1736991 - Fix clippy warnings in webdriver crate, r=webdriver-reviewers,jdescottes

Differential Revision: https://phabricator.services.mozilla.com/D129129
This commit is contained in:
James Graham 2021-10-22 11:46:31 +00:00
parent e1019b70ae
commit 6e505261a3
2 changed files with 3 additions and 3 deletions

View File

@ -124,7 +124,7 @@ impl SpecNewSessionParameters {
// Filter out entries with the value `null`
let null_entries = capabilities
.iter()
.filter(|&(_, ref value)| **value == Value::Null)
.filter(|&(_, value)| *value == Value::Null)
.map(|(k, _)| k.clone())
.collect::<Vec<String>>();
for key in null_entries {
@ -520,7 +520,7 @@ impl CapabilitiesMatching for SpecNewSessionParameters {
let default = Map::new();
let proxy = value.as_object().unwrap_or(&default);
if !browser_capabilities
.accept_proxy(&proxy, merged)
.accept_proxy(proxy, merged)
.unwrap_or(false)
{
return false;

View File

@ -398,7 +398,7 @@ fn origin_is_local(url_str: &str) -> WebDriverResult<bool> {
)
};
let url = Url::parse(&url_str).map_err(|_| make_err())?;
let url = Url::parse(url_str).map_err(|_| make_err())?;
let sockets = url.socket_addrs(|| None).map_err(|_| make_err())?;
Ok(!sockets.is_empty() && sockets.iter().all(|x| x.ip().is_loopback()))