aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/bindings
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2016-06-07 11:09:14 -0500
committerbors-servo <lbergstrom+bors@mozilla.com>2016-06-07 11:09:14 -0500
commit1e3edf3ca454b91dfdc267c5b2f4347eda9b7cb6 (patch)
tree3f9cbdf968bf83453f8f0ee5bb3c26495925346c /components/script/dom/bindings
parentf56848a0e8a9137f128088d1dd0f86e11fad841a (diff)
parentaea03b2f921a41bf78791a877539f1fafab887dd (diff)
downloadservo-1e3edf3ca454b91dfdc267c5b2f4347eda9b7cb6.tar.gz
servo-1e3edf3ca454b91dfdc267c5b2f4347eda9b7cb6.zip
Auto merge of #11656 - Ms2ger:reduce-dom-exposure, r=nox
Reduce the amount of dom code used outside the script crate. <!-- Reviewable:start --> This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11656) <!-- Reviewable:end -->
Diffstat (limited to 'components/script/dom/bindings')
-rw-r--r--components/script/dom/bindings/str.rs7
1 files changed, 0 insertions, 7 deletions
diff --git a/components/script/dom/bindings/str.rs b/components/script/dom/bindings/str.rs
index 3ee685fbe02..69565520899 100644
--- a/components/script/dom/bindings/str.rs
+++ b/components/script/dom/bindings/str.rs
@@ -8,7 +8,6 @@ use std::ascii::AsciiExt;
use std::borrow::ToOwned;
use std::fmt;
use std::hash::{Hash, Hasher};
-use std::mem;
use std::ops;
use std::ops::{Deref, DerefMut};
use std::str;
@@ -31,12 +30,6 @@ impl ByteString {
str::from_utf8(&self.0).ok()
}
- /// Returns ownership of the underlying Vec<u8> and copies an empty
- /// vec in its place
- pub fn bytes(&mut self) -> Vec<u8> {
- mem::replace(&mut self.0, Vec::new())
- }
-
/// Returns the length.
pub fn len(&self) -> usize {
self.0.len()