You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
case .Array(itemType: .some(let itemType)) where itemType.isObjCPrimitiveType:
This is probably not worth changing, but -- if it's possible to represent something as a pure pattern match without guards, it's faster because then the switch can compile into a jump table (I don't know if Swift takes advantage of this optimization though).
The way to do that in this case would be to change the way we parse the JSON schema for the Array and Map cases and change itemType to something like:
enum CollectionElement {
case Unknown
case ObjcClass(Schema)
case Primitive(name: String)
}
instead of what is something like Schema?
And then you can do a deeper pattern match on those cases to avoid the where clause
The text was updated successfully, but these errors were encountered:
From @bkase comment on #3 .
The text was updated successfully, but these errors were encountered: