Remove unused code from script* crates

This commit is contained in:
est31 2019-06-02 07:10:40 +02:00
parent 8dc7a25893
commit 8b6ed3d182
13 changed files with 2 additions and 133 deletions

View file

@ -17,7 +17,7 @@ use std::marker::PhantomData;
use std::ops;
use std::ops::{Deref, DerefMut};
use std::str;
use std::str::{Bytes, FromStr};
use std::str::FromStr;
/// Encapsulates the IDL `ByteString` type.
#[derive(Clone, Debug, Default, Eq, JSTraceable, MallocSizeOf, PartialEq)]
@ -40,11 +40,6 @@ impl ByteString {
self.0.len()
}
/// Compare `self` to `other`, matching AZ and az as equal.
pub fn eq_ignore_case(&self, other: &ByteString) -> bool {
self.0.eq_ignore_ascii_case(&other.0)
}
/// Returns `self` with AZ replaced by az.
pub fn to_lower(&self) -> ByteString {
ByteString::new(self.0.to_ascii_lowercase())
@ -219,11 +214,6 @@ impl DOMString {
self.0.truncate(new_len);
}
/// An iterator over the bytes of this `DOMString`.
pub fn bytes(&self) -> Bytes {
self.0.bytes()
}
/// Removes newline characters according to <https://infra.spec.whatwg.org/#strip-newlines>.
pub fn strip_newlines(&mut self) {
self.0.retain(|c| c != '\r' && c != '\n');