diff --git a/components/script/clipboard_provider.rs b/components/script/clipboard_provider.rs
index 81860f59eef..50f6d0fb6c6 100644
--- a/components/script/clipboard_provider.rs
+++ b/components/script/clipboard_provider.rs
@@ -27,13 +27,13 @@ impl ClipboardProvider for ConstellationChan {
}
pub struct DummyClipboardContext {
- content: String
+ content: String,
}
impl DummyClipboardContext {
pub fn new(s: &str) -> DummyClipboardContext {
DummyClipboardContext {
- content: s.to_owned()
+ content: s.to_owned(),
}
}
}
diff --git a/components/script/cors.rs b/components/script/cors.rs
index f23925b29ed..463d2378009 100644
--- a/components/script/cors.rs
+++ b/components/script/cors.rs
@@ -46,7 +46,7 @@ pub struct CORSRequest {
pub headers: Headers,
/// CORS preflight flag (https://fetch.spec.whatwg.org/#concept-http-fetch)
/// Indicates that a CORS preflight request and/or cache check is to be performed
- pub preflight_flag: bool
+ pub preflight_flag: bool,
}
/// https://fetch.spec.whatwg.org/#concept-request-mode
@@ -55,15 +55,18 @@ pub struct CORSRequest {
#[derive(PartialEq, Copy, Clone, HeapSizeOf)]
pub enum RequestMode {
CORS, // CORS
- ForcedPreflight // CORS-with-forced-preflight
+ ForcedPreflight, // CORS-with-forced-preflight
}
impl CORSRequest {
/// Creates a CORS request if necessary. Will return an error when fetching is forbidden
- pub fn maybe_new(referer: Url, destination: Url, mode: RequestMode,
- method: Method, headers: Headers) -> Result