def ShouldInlineStruct(struct): # TODO(darin): Base this on the size of the wrapper class. if len(struct.fields) > 4: return False for field in struct.fields: if mojom.IsMoveOnlyKind(field.kind): return False return True
def ShouldInlineUnion(union): return not any(mojom.IsMoveOnlyKind(field.kind) for field in union.fields)