Update XHR BodyInit, update extract method impl

This commit is contained in:
St.Spyder 2016-01-17 22:39:35 +05:30
parent 7f16b4e47b
commit 763b99258f
3 changed files with 36 additions and 32 deletions

View file

@ -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 {