Bug 1622256 - Remove usage of deprecated Error::description. r=jgraham,webdriver-reviewers

Depends on D66766

Differential Revision: https://phabricator.services.mozilla.com/D66767

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Kartikaya Gupta 2020-03-14 04:21:22 +00:00
parent b94a7e4f32
commit 815a0c36ff
2 changed files with 4 additions and 5 deletions

View File

@ -9,7 +9,6 @@ use regex::bytes::Regex;
use serde_json::{Map, Value};
use std::collections::BTreeMap;
use std::default::Default;
use std::error::Error;
use std::fs;
use std::io;
use std::io::BufWriter;
@ -104,7 +103,7 @@ impl<'a> FirefoxCapabilities<'a> {
fn convert_version_error(err: mozversion::Error) -> WebDriverError {
WebDriverError::new(
ErrorStatus::SessionNotCreated,
err.description().to_string(),
err.to_string(),
)
}

View File

@ -355,19 +355,19 @@ impl From<serde_json::Error> for WebDriverError {
impl From<io::Error> for WebDriverError {
fn from(err: io::Error) -> WebDriverError {
WebDriverError::new(ErrorStatus::UnknownError, err.description().to_string())
WebDriverError::new(ErrorStatus::UnknownError, err.to_string())
}
}
impl From<DecodeError> for WebDriverError {
fn from(err: DecodeError) -> WebDriverError {
WebDriverError::new(ErrorStatus::UnknownError, err.description().to_string())
WebDriverError::new(ErrorStatus::UnknownError, err.to_string())
}
}
impl From<Box<dyn Error>> for WebDriverError {
fn from(err: Box<dyn Error>) -> WebDriverError {
WebDriverError::new(ErrorStatus::UnknownError, err.description().to_string())
WebDriverError::new(ErrorStatus::UnknownError, err.to_string())
}
}