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

@ -168,9 +168,6 @@ pub mod codegen {
pub mod InterfaceObjectMap {
include!(concat!(env!("OUT_DIR"), "/InterfaceObjectMap.rs"));
}
pub mod InterfaceTypes {
include!(concat!(env!("OUT_DIR"), "/InterfaceTypes.rs"));
}
#[allow(dead_code, unused_imports)]
pub mod InheritTypes {
include!(concat!(env!("OUT_DIR"), "/InheritTypes.rs"));

View file

@ -671,14 +671,6 @@ impl<T: DomObject> LayoutDom<T> {
debug_assert!(thread_state::get().is_layout());
self.ptr.as_ptr()
}
/// Returns a reference to the interior of this JS object. This method is
/// safe to call because it originates from the layout thread, and it cannot
/// mutate DOM nodes.
pub fn get_for_script(&self) -> &T {
debug_assert!(thread_state::get().is_script());
unsafe { &*self.ptr.as_ptr() }
}
}
/// Helper trait for safer manipulations of `Option<Heap<T>>` values.

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');