aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/htmltextareaelement.rs
diff options
context:
space:
mode:
authorEkta Siwach <137225906+ektuu@users.noreply.github.com>2024-03-27 02:55:42 +0530
committerGitHub <noreply@github.com>2024-03-26 21:25:42 +0000
commit92b557867c199472ce42a2f5b99676c485ed2ae1 (patch)
treeee8858794b4d7dfe025e1e61c5cf84a0207b63f5 /components/script/dom/htmltextareaelement.rs
parent8dece05980a4ec46b06505e511f8b158d4c0fe3b (diff)
downloadservo-92b557867c199472ce42a2f5b99676c485ed2ae1.tar.gz
servo-92b557867c199472ce42a2f5b99676c485ed2ae1.zip
clippy: fixed some warnings in components/script (#31888)
Diffstat (limited to 'components/script/dom/htmltextareaelement.rs')
-rwxr-xr-xcomponents/script/dom/htmltextareaelement.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/components/script/dom/htmltextareaelement.rs b/components/script/dom/htmltextareaelement.rs
index e92b95f5cff..01332823ae4 100755
--- a/components/script/dom/htmltextareaelement.rs
+++ b/components/script/dom/htmltextareaelement.rs
@@ -100,7 +100,7 @@ impl LayoutHTMLTextAreaElementHelpers for LayoutDom<'_, HTMLTextAreaElement> {
// placeholder is single line, but that's an unimportant detail.
self.placeholder()
.replace("\r\n", "\n")
- .replace("\r", "\n")
+ .replace('\r', "\n")
.into()
} else {
text.into()
@@ -545,7 +545,7 @@ impl VirtualMethods for HTMLTextAreaElement {
}
fn bind_to_tree(&self, context: &BindContext) {
- if let Some(ref s) = self.super_type() {
+ if let Some(s) = self.super_type() {
s.bind_to_tree(context);
}
@@ -599,7 +599,7 @@ impl VirtualMethods for HTMLTextAreaElement {
maybe_doc: Option<&Document>,
clone_children: CloneChildrenFlag,
) {
- if let Some(ref s) = self.super_type() {
+ if let Some(s) = self.super_type() {
s.cloning_steps(copy, maybe_doc, clone_children);
}
let el = copy.downcast::<HTMLTextAreaElement>().unwrap();
@@ -613,7 +613,7 @@ impl VirtualMethods for HTMLTextAreaElement {
}
fn children_changed(&self, mutation: &ChildrenMutation) {
- if let Some(ref s) = self.super_type() {
+ if let Some(s) = self.super_type() {
s.children_changed(mutation);
}
if !self.value_dirty.get() {
@@ -702,7 +702,7 @@ impl FormControl for HTMLTextAreaElement {
self.form_owner.set(form);
}
- fn to_element<'a>(&'a self) -> &'a Element {
+ fn to_element(&self) -> &Element {
self.upcast::<Element>()
}
}