Skip to content

Commit

Permalink
Rename innerSequenceType to innerContainerType.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ms2ger committed Sep 21, 2016
1 parent e942f50 commit b2fc80a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions components/script/dom/bindings/codegen/CodegenRust.py
Expand Up @@ -92,7 +92,7 @@ def stripTrailingWhitespace(text):
return '\n'.join(lines) + tail


def innerSequenceType(type):
def innerContainerType(type):
assert type.isSequence()
return type.inner.inner if type.nullable() else type.inner

Expand Down Expand Up @@ -725,7 +725,7 @@ def wrapObjectTemplate(templateBody, nullValue, isDefinitelyObject, type,
raise TypeError("Can't handle array arguments yet")

if type.isSequence():
innerInfo = getJSToNativeConversionInfo(innerSequenceType(type),
innerInfo = getJSToNativeConversionInfo(innerContainerType(type),
descriptorProvider,
isMember=isMember)
declType = CGWrapper(innerInfo.declType, pre="Vec<", post=">")
Expand Down Expand Up @@ -1351,7 +1351,7 @@ def getRetvalDeclarationForType(returnType, descriptorProvider):
result = CGWrapper(result, pre="Option<", post=">")
return result
if returnType.isSequence():
result = getRetvalDeclarationForType(innerSequenceType(returnType), descriptorProvider)
result = getRetvalDeclarationForType(innerContainerType(returnType), descriptorProvider)
result = CGWrapper(result, pre="Vec<", post=">")
if returnType.nullable():
result = CGWrapper(result, pre="Option<", post=">")
Expand Down Expand Up @@ -3997,7 +3997,7 @@ def getUnionTypeTemplateVars(type, descriptorProvider):
typeName = name
elif type.isSequence():
name = type.name
inner = getUnionTypeTemplateVars(innerSequenceType(type), descriptorProvider)
inner = getUnionTypeTemplateVars(innerContainerType(type), descriptorProvider)
typeName = "Vec<" + inner["typeName"] + ">"
elif type.isByteString():
name = type.name
Expand Down

0 comments on commit b2fc80a

Please sign in to comment.