Bug 1617369 - Reformat recent rust changes with rustfmt r=webdriver-reviewers,whimboo

# ignore-this-changeset

Depends on D76451

Differential Revision: https://phabricator.services.mozilla.com/D76663
This commit is contained in:
Sylvestre Ledru 2020-05-25 09:07:45 +00:00
parent e8574b55a1
commit f69840fd80
5 changed files with 6 additions and 14 deletions

View File

@ -280,7 +280,6 @@ impl WrVecU8 {
vec.extend_from_slice(bytes);
*self = Self::from_vec(vec);
}
}
#[no_mangle]

View File

@ -232,8 +232,6 @@ pub struct LogOptions {
pub level: Option<logging::Level>,
}
#[cfg(test)]
mod tests {
use serde_json::json;

View File

@ -1,8 +1,7 @@
use crate::android::AndroidHandler;
use crate::command::{
AddonInstallParameters, AddonUninstallParameters, GeckoContextParameters,
GeckoExtensionCommand, GeckoExtensionRoute, XblLocatorParameters,
CHROME_ELEMENT_KEY,
GeckoExtensionCommand, GeckoExtensionRoute, XblLocatorParameters, CHROME_ELEMENT_KEY,
};
use marionette_rs::common::{
Cookie as MarionetteCookie, Date as MarionetteDate, Frame as MarionetteFrame,
@ -41,8 +40,8 @@ use webdriver::command::WebDriverCommand::{
GetPageSource, GetTimeouts, GetTitle, GetWindowHandle, GetWindowHandles, GetWindowRect, GoBack,
GoForward, IsDisplayed, IsEnabled, IsSelected, MaximizeWindow, MinimizeWindow, NewSession,
NewWindow, PerformActions, Print, Refresh, ReleaseActions, SendAlertText, SetTimeouts,
SetWindowRect, Status, SwitchToFrame, SwitchToParentFrame, SwitchToWindow, TakeElementScreenshot,
TakeScreenshot,
SetWindowRect, Status, SwitchToFrame, SwitchToParentFrame, SwitchToWindow,
TakeElementScreenshot, TakeScreenshot,
};
use webdriver::command::{
ActionsParameters, AddCookieParameters, GetNamedCookieParameters, GetParameters,

View File

@ -337,7 +337,7 @@ impl<U: WebDriverExtensionRoute> WebDriverMessage<U> {
);
let element = WebElement(element_id.as_str().into());
WebDriverCommand::TakeElementScreenshot(element)
},
}
Route::Print => WebDriverCommand::Print(serde_json::from_str(raw_body)?),
Route::Status => WebDriverCommand::Status,
Route::Extension(ref extension) => extension.command(params, &body_data)?,
@ -1211,7 +1211,7 @@ mod tests {
assert_de(&new_window, json);
}
#[test]
#[test]
fn test_json_print_defaults() {
let params = PrintParameters::default();
assert_de(&params, json!({}));

View File

@ -279,11 +279,7 @@ pub(crate) fn standard_routes<U: WebDriverExtensionRoute>() -> Vec<(Method, &'st
"/session/{sessionId}/actions",
Route::ReleaseActions,
),
(
Method::POST,
"/session/{sessionId}/print",
Route::Print,
),
(Method::POST, "/session/{sessionId}/print", Route::Print),
(Method::GET, "/status", Route::Status),
];
}