mirror of
https://github.com/servo/servo.git
synced 2025-09-30 16:49:16 +01:00
Auto merge of #23499 - est31:unused_code_removal_3, r=jdm
Remove unused code (3/N) <!-- Please describe your changes on the following line: --> Third PR in a series of PRs to remove unused/dead code from servo, powered by an (upcoming) tool of mine. Please take a look and tell me if you want to keep something. * First PR: #23477 * Second PR: #23498 --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [ ] These changes fix #___ (GitHub issue number if applicable) <!-- Either: --> - [ ] There are tests for these changes OR - [x] These changes do not require tests because they only remove dead code <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/23499) <!-- Reviewable:end -->
This commit is contained in:
commit
faf3a183f3
19 changed files with 4 additions and 203 deletions
|
@ -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"));
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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