mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Remove unused code from script* crates
This commit is contained in:
parent
8dc7a25893
commit
8b6ed3d182
13 changed files with 2 additions and 133 deletions
|
@ -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 A–Z and a–z as equal.
|
||||
pub fn eq_ignore_case(&self, other: &ByteString) -> bool {
|
||||
self.0.eq_ignore_ascii_case(&other.0)
|
||||
}
|
||||
|
||||
/// Returns `self` with A–Z replaced by a–z.
|
||||
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');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue