From a0d9f97c8e5fbe91f4f10058cfae1bc78d88fc98 Mon Sep 17 00:00:00 2001 From: Simon Sapin Date: Thu, 25 Feb 2021 10:39:53 +0100 Subject: Fix warnings introduced in newer Rust Nightly This does not (yet) upgrade ./rust-toolchain The warnings: * dead_code "field is never read" * redundant_semicolons "unnecessary trailing semicolon" * non_fmt_panic "panic message is not a string literal, this is no longer accepted in Rust 2021" * unstable_name_collisions "a method with this name may be added to the standard library in the future" * legacy_derive_helpers "derive helper attribute is used before it is introduced" https://github.com/rust-lang/rust/issues/79202 --- components/webdriver_server/lib.rs | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'components/webdriver_server/lib.rs') diff --git a/components/webdriver_server/lib.rs b/components/webdriver_server/lib.rs index 645ea96e3f0..b6582cfab5b 100644 --- a/components/webdriver_server/lib.rs +++ b/components/webdriver_server/lib.rs @@ -138,12 +138,11 @@ pub struct WebDriverSession { implicit_wait_timeout: u64, page_loading_strategy: String, - secure_tls: bool, + strict_file_interactability: bool, + unhandled_prompt_behavior: String, - // https://w3c.github.io/webdriver/#dfn-active-input-sources - active_input_sources: Vec, // https://w3c.github.io/webdriver/#dfn-input-state-table input_state_table: HashMap, // https://w3c.github.io/webdriver/#dfn-input-cancel-list @@ -165,11 +164,9 @@ impl WebDriverSession { implicit_wait_timeout: 0, page_loading_strategy: "normal".to_string(), - secure_tls: true, strict_file_interactability: false, unhandled_prompt_behavior: "dismiss and notify".to_string(), - active_input_sources: Vec::new(), input_state_table: HashMap::new(), input_cancel_list: Vec::new(), } @@ -532,8 +529,8 @@ impl Handler { ); match processed.get("acceptInsecureCerts") { - Some(accept_insecure_certs) => { - session.secure_tls = !accept_insecure_certs.as_bool().unwrap() + Some(_accept_insecure_certs) => { + // FIXME do something here? }, None => { processed.insert( @@ -1374,7 +1371,6 @@ impl Handler { let session = self.session_mut()?; session.input_state_table = HashMap::new(); - session.active_input_sources = Vec::new(); Ok(WebDriverResponse::Void) } -- cgit v1.2.3