aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGae24 <96017547+Gae24@users.noreply.github.com>2024-10-10 18:15:05 +0200
committerGitHub <noreply@github.com>2024-10-10 16:15:05 +0000
commitc6d305fbb32dcda968b5f7501796137252d9d643 (patch)
tree750047924d7fa285e174cfc0ab3faefd8fcca7cc
parentf9a06d62a2757eefc729f2126a0d50afa919399f (diff)
downloadservo-c6d305fbb32dcda968b5f7501796137252d9d643.tar.gz
servo-c6d305fbb32dcda968b5f7501796137252d9d643.zip
fix clippy warnings in codegen (#33781)
Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com>
-rw-r--r--components/script/dom/bindings/codegen/CodegenRust.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/components/script/dom/bindings/codegen/CodegenRust.py b/components/script/dom/bindings/codegen/CodegenRust.py
index 9cffaf35f93..6348bc52c33 100644
--- a/components/script/dom/bindings/codegen/CodegenRust.py
+++ b/components/script/dom/bindings/codegen/CodegenRust.py
@@ -2761,7 +2761,7 @@ class CGAbstractMethod(CGThing):
if self.returnType == "void":
pre = "wrap_panic(&mut || {\n"
post = "\n})"
- elif "return" not in body.define():
+ elif "return" not in body.define() or self.name.startswith("_constructor"):
pre = (
"let mut result = false;\n"
"wrap_panic(&mut || result = {\n"
@@ -6254,7 +6254,7 @@ let global = GlobalScope::from_object(JS_CALLEE(*cx, vp).to_object());
]
else:
args = [
- "&global",
+ "global",
"Some(desired_proto.handle())",
"CanGc::note()"
]