diff options
author | marmeladema <xademax@gmail.com> | 2019-12-10 23:56:12 +0000 |
---|---|---|
committer | marmeladema <xademax@gmail.com> | 2019-12-11 16:03:20 +0000 |
commit | 7b5fabe8552b9245a70961db9ec592a55102bb0e (patch) | |
tree | b31bc428ddabb8dfeaabafaff504f4db7e937401 /components/script/dom/bindings/codegen/CodegenRust.py | |
parent | 9d04f231f4a32050d78221d4e13d4951df649269 (diff) | |
download | servo-7b5fabe8552b9245a70961db9ec592a55102bb0e.tar.gz servo-7b5fabe8552b9245a70961db9ec592a55102bb0e.zip |
Fix tidiness errors for Python3 compatibility across whole repo
Diffstat (limited to 'components/script/dom/bindings/codegen/CodegenRust.py')
-rw-r--r-- | components/script/dom/bindings/codegen/CodegenRust.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/components/script/dom/bindings/codegen/CodegenRust.py b/components/script/dom/bindings/codegen/CodegenRust.py index 39e8bfa275d..ec29a59c9d4 100644 --- a/components/script/dom/bindings/codegen/CodegenRust.py +++ b/components/script/dom/bindings/codegen/CodegenRust.py @@ -3943,8 +3943,8 @@ class CGMemberJITInfo(CGThing): depth=self.descriptor.interface.inheritanceDepth(), opType=opType, aliasSet=aliasSet, - returnType=reduce(CGMemberJITInfo.getSingleReturnType, returnTypes, - ""), + returnType=functools.reduce(CGMemberJITInfo.getSingleReturnType, returnTypes, + ""), isInfallible=toStringBool(infallible), isMovable=toStringBool(movable), # FIXME(nox): https://github.com/servo/servo/issues/10991 @@ -4131,8 +4131,8 @@ class CGMemberJITInfo(CGThing): if u.hasNullableType: # Might be null or not return "JSVAL_TYPE_UNKNOWN" - return reduce(CGMemberJITInfo.getSingleReturnType, - u.flatMemberTypes, "") + return functools.reduce(CGMemberJITInfo.getSingleReturnType, + u.flatMemberTypes, "") if t.isDictionary(): return "JSVAL_TYPE_OBJECT" if t.isDate(): @@ -4202,8 +4202,8 @@ class CGMemberJITInfo(CGThing): if t.isUnion(): u = t.unroll() type = "JSJitInfo::Null as i32" if u.hasNullableType else "" - return reduce(CGMemberJITInfo.getSingleArgType, - u.flatMemberTypes, type) + return functools.reduce(CGMemberJITInfo.getSingleArgType, + u.flatMemberTypes, type) if t.isDictionary(): return "JSJitInfo_ArgType::Object as i32" if t.isDate(): @@ -5858,7 +5858,7 @@ class CGInterfaceTrait(CGThing): def contains_unsafe_arg(arguments): if not arguments or len(arguments) == 0: return False - return reduce((lambda x, y: x or y[1] == '*mut JSContext'), arguments, False) + return functools.reduce((lambda x, y: x or y[1] == '*mut JSContext'), arguments, False) methods = [] for name, arguments, rettype in members(): |