diff options
Diffstat (limited to 'components/util/str.rs')
-rw-r--r-- | components/util/str.rs | 6 |
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 { |