Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mozilla/geckodriver.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJames Graham <james@hoppipolla.co.uk>2016-04-09 02:01:32 +0300
committerJames Graham <james@hoppipolla.co.uk>2016-04-27 17:15:48 +0300
commit2c6434340d6c4e7688f3d7ddda1ed48bc2ce17e1 (patch)
treee724248dc79a91b9ca3443940f64c6bf9970b9fb /src
parent3045c00a77b7ef7220ec9a6b318cae0756221a87 (diff)
Update for webdriver lifetime changes
Diffstat (limited to 'src')
-rw-r--r--src/marionette.rs18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/marionette.rs b/src/marionette.rs
index 53d4802..b00b6b1 100644
--- a/src/marionette.rs
+++ b/src/marionette.rs
@@ -200,8 +200,8 @@ impl Parameters for GeckoContextParameters {
"chrome" => Ok(GeckoContext::Chrome),
"content" => Ok(GeckoContext::Content),
_ => Err(WebDriverError::new(ErrorStatus::InvalidArgument,
- &format!("{} is not a valid context",
- value)))
+ format!("{} is not a valid context",
+ value)))
});
Ok(GeckoContextParameters {
context: context
@@ -271,7 +271,7 @@ impl MarionetteHandler {
match self.start_browser(profile) {
Err(e) => {
return Err(WebDriverError::new(ErrorStatus::UnknownError,
- e.description()));
+ e.description().to_owned()));
},
Ok(_) => {}
}
@@ -503,14 +503,14 @@ impl MarionetteSession {
if resp.id != self.command_id {
return Err(WebDriverError::new(ErrorStatus::UnknownError,
- &*format!("Marionette responses arrived out of sequence, expected {}, got {}",
- self.command_id, resp.id)));
+ format!("Marionette responses arrived out of sequence, expected {}, got {}",
+ self.command_id, resp.id)));
}
if let Some(error) = resp.error {
let status = self.error_from_string(&error.status);
- return Err(WebDriverError::new(status, &*error.message));
+ return Err(WebDriverError::new(status, error.message));
}
try!(self.update(message, &resp));
@@ -1027,7 +1027,7 @@ impl MarionetteConnection {
sleep(Duration::from_millis(poll_interval));
} else {
return Err(WebDriverError::new(ErrorStatus::UnknownError,
- e.description()));
+ e.description().to_owned()));
}
}
}
@@ -1059,8 +1059,8 @@ impl MarionetteConnection {
if self.session.protocol != Some("3".into()) {
return Err(WebDriverError::new(
ErrorStatus::UnknownError,
- &*format!("Unsupported marionette protocol version {}, required 3",
- self.session.protocol.as_ref().unwrap_or(&"<unknown>".into()))));
+ format!("Unsupported marionette protocol version {}, required 3",
+ self.session.protocol.as_ref().unwrap_or(&"<unknown>".into()))));
}
Ok(())