mirror of
https://github.com/servo/servo.git
synced 2025-08-02 20:20:14 +01:00
clippy: Fix needless_lifetimes warnings (#31933)
This commit is contained in:
parent
a8976ff00a
commit
4a68243f65
13 changed files with 32 additions and 32 deletions
|
@ -88,7 +88,7 @@ unsafe impl<T> StableTraceObject for Dom<T>
|
|||
where
|
||||
T: DomObject,
|
||||
{
|
||||
fn stable_trace_object<'a>(&'a self) -> *const dyn JSTraceable {
|
||||
fn stable_trace_object(&self) -> *const dyn JSTraceable {
|
||||
// The JSTraceable impl for Reflector doesn't actually do anything,
|
||||
// so we need this shenanigan to actually trace the reflector of the
|
||||
// T pointer in Dom<T>.
|
||||
|
@ -107,7 +107,7 @@ unsafe impl<T> StableTraceObject for MaybeUnreflectedDom<T>
|
|||
where
|
||||
T: DomObject,
|
||||
{
|
||||
fn stable_trace_object<'a>(&'a self) -> *const dyn JSTraceable {
|
||||
fn stable_trace_object(&self) -> *const dyn JSTraceable {
|
||||
// The JSTraceable impl for Reflector doesn't actually do anything,
|
||||
// so we need this shenanigan to actually trace the reflector of the
|
||||
// T pointer in Dom<T>.
|
||||
|
|
|
@ -2645,7 +2645,7 @@ impl FormControl for HTMLInputElement {
|
|||
self.form_owner.set(form);
|
||||
}
|
||||
|
||||
fn to_element<'a>(&'a self) -> &'a Element {
|
||||
fn to_element(&self) -> &Element {
|
||||
self.upcast::<Element>()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -190,7 +190,7 @@ impl FormControl for HTMLLabelElement {
|
|||
// form owner. Therefore it doesn't hold form owner itself.
|
||||
}
|
||||
|
||||
fn to_element<'a>(&'a self) -> &'a Element {
|
||||
fn to_element(&self) -> &Element {
|
||||
self.upcast::<Element>()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -103,7 +103,7 @@ impl FormControl for HTMLLegendElement {
|
|||
self.form_owner.set(form);
|
||||
}
|
||||
|
||||
fn to_element<'a>(&'a self) -> &'a Element {
|
||||
fn to_element(&self) -> &Element {
|
||||
self.upcast::<Element>()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -175,7 +175,7 @@ impl FormControl for HTMLObjectElement {
|
|||
self.form_owner.set(form);
|
||||
}
|
||||
|
||||
fn to_element<'a>(&'a self) -> &'a Element {
|
||||
fn to_element(&self) -> &Element {
|
||||
self.upcast::<Element>()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -152,7 +152,7 @@ impl HTMLOutputElementMethods for HTMLOutputElement {
|
|||
}
|
||||
|
||||
impl VirtualMethods for HTMLOutputElement {
|
||||
fn super_type<'b>(&'b self) -> Option<&'b dyn VirtualMethods> {
|
||||
fn super_type(&self) -> Option<&dyn VirtualMethods> {
|
||||
Some(self.upcast::<HTMLElement>() as &dyn VirtualMethods)
|
||||
}
|
||||
|
||||
|
@ -176,7 +176,7 @@ impl FormControl for HTMLOutputElement {
|
|||
self.form_owner.set(form);
|
||||
}
|
||||
|
||||
fn to_element<'a>(&'a self) -> &'a Element {
|
||||
fn to_element(&self) -> &Element {
|
||||
self.upcast::<Element>()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -490,7 +490,7 @@ impl FormControl for HTMLSelectElement {
|
|||
self.form_owner.set(form);
|
||||
}
|
||||
|
||||
fn to_element<'a>(&'a self) -> &'a Element {
|
||||
fn to_element(&self) -> &Element {
|
||||
self.upcast::<Element>()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -138,7 +138,7 @@ impl NodeList {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn iter<'a>(&'a self) -> impl Iterator<Item = DomRoot<Node>> + 'a {
|
||||
pub fn iter(&self) -> impl Iterator<Item = DomRoot<Node>> + '_ {
|
||||
let len = self.Length();
|
||||
// There is room for optimization here in non-simple cases,
|
||||
// as calling Item repeatedly on a live list can involve redundant work.
|
||||
|
|
|
@ -87,7 +87,7 @@ where
|
|||
T::name()
|
||||
}
|
||||
|
||||
fn as_any<'a>(&'a self) -> &'a dyn Any {
|
||||
fn as_any(&self) -> &dyn Any {
|
||||
self
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1575,7 +1575,7 @@ impl WebGLRenderingContext {
|
|||
constants::COLOR_ATTACHMENT0 <= attachment && attachment <= last_slot
|
||||
}
|
||||
|
||||
pub fn compressed_tex_image_2d<'a>(
|
||||
pub fn compressed_tex_image_2d(
|
||||
&self,
|
||||
target: u32,
|
||||
level: i32,
|
||||
|
@ -1583,7 +1583,7 @@ impl WebGLRenderingContext {
|
|||
width: i32,
|
||||
height: i32,
|
||||
border: i32,
|
||||
data: &'a [u8],
|
||||
data: &[u8],
|
||||
) {
|
||||
let validator = CompressedTexImage2DValidator::new(
|
||||
self,
|
||||
|
@ -1642,7 +1642,7 @@ impl WebGLRenderingContext {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn compressed_tex_sub_image_2d<'a>(
|
||||
pub fn compressed_tex_sub_image_2d(
|
||||
&self,
|
||||
target: u32,
|
||||
level: i32,
|
||||
|
@ -1651,7 +1651,7 @@ impl WebGLRenderingContext {
|
|||
width: i32,
|
||||
height: i32,
|
||||
format: u32,
|
||||
data: &'a [u8],
|
||||
data: &[u8],
|
||||
) {
|
||||
let validator = CompressedTexSubImage2DValidator::new(
|
||||
self,
|
||||
|
|
|
@ -478,7 +478,7 @@ impl Documents {
|
|||
.and_then(|doc| doc.find_iframe(browsing_context_id))
|
||||
}
|
||||
|
||||
pub fn iter<'a>(&'a self) -> DocumentsIter<'a> {
|
||||
pub fn iter(&self) -> DocumentsIter<'_> {
|
||||
DocumentsIter {
|
||||
iter: self.map.iter(),
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue