aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/bindings/codegen/CodegenRust.py
diff options
context:
space:
mode:
authorAnthony Ramine <n.oxyde@gmail.com>2015-04-30 00:02:36 +0200
committerAnthony Ramine <n.oxyde@gmail.com>2015-05-14 19:11:10 +0200
commitd9619853e210ad70932b7b3b2ab2633a907e1676 (patch)
treeb51c8b8f4cdc9bdd49bce61bdbd92b7ae2569d51 /components/script/dom/bindings/codegen/CodegenRust.py
parent8979d77e77f58b2061d9cec81a08b7e6bf6c6e6a (diff)
downloadservo-d9619853e210ad70932b7b3b2ab2633a907e1676.tar.gz
servo-d9619853e210ad70932b7b3b2ab2633a907e1676.zip
Fix length value of interface methods
Diffstat (limited to 'components/script/dom/bindings/codegen/CodegenRust.py')
-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 a005956e02e..689587c377b 100644
--- a/components/script/dom/bindings/codegen/CodegenRust.py
+++ b/components/script/dom/bindings/codegen/CodegenRust.py
@@ -1224,11 +1224,11 @@ class PropertyDefiner:
",\n".join(specs) + "\n" +
"];\n") % (name, specType))
-# The length of a method is the maximum of the lengths of the
+# The length of a method is the minimum of the lengths of the
# argument lists of all its overloads.
def methodLength(method):
signatures = method.signatures()
- return max([len(arguments) for (retType, arguments) in signatures])
+ return min(len([arg for arg in arguments if not arg.optional and not arg.variadic]) for (_, arguments) in signatures)
class MethodDefiner(PropertyDefiner):
"""