aboutsummaryrefslogtreecommitdiffstats
path: root/components/util/str.rs
diff options
context:
space:
mode:
authorSt.Spyder <stspyder@users.noreply.github.com>2016-01-17 22:39:35 +0530
committerSt.Spyder <stspyder@users.noreply.github.com>2016-01-18 02:26:13 +0530
commit763b99258f3d7f40248f32a6ebc78b462511d416 (patch)
treed051e081bd65c027007bc25cbc158a2ccaaf0f08 /components/util/str.rs
parent7f16b4e47bf8aef035ea788d80172dfd1a11ecff (diff)
downloadservo-763b99258f3d7f40248f32a6ebc78b462511d416.tar.gz
servo-763b99258f3d7f40248f32a6ebc78b462511d416.zip
Update XHR BodyInit, update extract method impl
Diffstat (limited to 'components/util/str.rs')
-rw-r--r--components/util/str.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/components/util/str.rs b/components/util/str.rs
index 2d068617b46..0b1e863a8de 100644
--- a/components/util/str.rs
+++ b/components/util/str.rs
@@ -14,7 +14,7 @@ use std::ffi::CStr;
use std::fmt;
use std::iter::{Filter, Peekable};
use std::ops::{Deref, DerefMut};
-use std::str::{CharIndices, FromStr, Split, from_utf8};
+use std::str::{Bytes, CharIndices, FromStr, Split, from_utf8};
#[derive(Clone, PartialOrd, Ord, PartialEq, Eq, Deserialize, Serialize, Hash, Debug)]
pub struct DOMString(String);
@@ -35,6 +35,10 @@ impl DOMString {
pub fn clear(&mut self) {
self.0.clear()
}
+
+ pub fn bytes(&self) -> Bytes {
+ self.0.bytes()
+ }
}
impl Default for DOMString {