aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/textencoder.rs
diff options
context:
space:
mode:
authorchansuke <chansuke@georepublic.de>2018-09-18 23:24:15 +0900
committerJosh Matthews <josh@joshmatthews.net>2018-09-19 17:40:47 -0400
commitc37a345dc9f4dda6ea29c42f96f6c7201c42cbac (patch)
tree1f05b49bac02318455a59d5b143c186fd872bdb9 /components/script/dom/textencoder.rs
parent2ca7a134736bb4759ff209c1bc0b6dc3cc1984c9 (diff)
downloadservo-c37a345dc9f4dda6ea29c42f96f6c7201c42cbac.tar.gz
servo-c37a345dc9f4dda6ea29c42f96f6c7201c42cbac.zip
Format script component
Diffstat (limited to 'components/script/dom/textencoder.rs')
-rw-r--r--components/script/dom/textencoder.rs12
1 files changed, 8 insertions, 4 deletions
diff --git a/components/script/dom/textencoder.rs b/components/script/dom/textencoder.rs
index cc0eae4e5a2..9a9e7925e49 100644
--- a/components/script/dom/textencoder.rs
+++ b/components/script/dom/textencoder.rs
@@ -28,9 +28,11 @@ impl TextEncoder {
}
pub fn new(global: &GlobalScope) -> DomRoot<TextEncoder> {
- reflect_dom_object(Box::new(TextEncoder::new_inherited()),
- global,
- TextEncoderBinding::Wrap)
+ reflect_dom_object(
+ Box::new(TextEncoder::new_inherited()),
+ global,
+ TextEncoderBinding::Wrap,
+ )
}
// https://encoding.spec.whatwg.org/#dom-textencoder
@@ -51,7 +53,9 @@ impl TextEncoderMethods for TextEncoder {
let encoded = input.0.as_bytes();
rooted!(in(cx) let mut js_object = ptr::null_mut::<JSObject>());
- assert!(Uint8Array::create(cx, CreateWith::Slice(&encoded), js_object.handle_mut()).is_ok());
+ assert!(
+ Uint8Array::create(cx, CreateWith::Slice(&encoded), js_object.handle_mut()).is_ok()
+ );
NonNull::new_unchecked(js_object.get())
}