mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 13:51:41 +00:00
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:
parent
e1019b70ae
commit
6e505261a3
@ -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;
|
||||
|
@ -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()))
|
||||
|
Loading…
Reference in New Issue
Block a user