clippy: fix some warnings in components/script (#31865)

This commit is contained in:
Ekta Siwach 2024-03-26 16:01:22 +05:30 committed by GitHub
parent 58f170c97a
commit 188f3caff1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 16 additions and 16 deletions

View file

@ -240,7 +240,7 @@ impl Attr {
#[allow(unsafe_code)]
pub trait AttrHelpersForLayout<'dom> {
fn value(self) -> &'dom AttrValue;
fn as_str(self) -> &'dom str;
fn as_str(&self) -> &'dom str;
fn as_tokens(self) -> Option<&'dom [Atom]>;
fn local_name(self) -> &'dom LocalName;
fn namespace(self) -> &'dom Namespace;
@ -254,7 +254,7 @@ impl<'dom> AttrHelpersForLayout<'dom> for LayoutDom<'dom, Attr> {
}
#[inline]
fn as_str(self) -> &'dom str {
fn as_str(&self) -> &'dom str {
self.value()
}