automerge / automerge-swift

Swift language bindings presenting Automerge
https://automerge.org/automerge-swift/documentation/automerge/
MIT License
217 stars 11 forks source link

Removes force downcast in favor of condidional cast in switch #137

Closed lightsprint09 closed 3 months ago

lightsprint09 commented 3 months ago

While implementing URL support I found an elegant way to get rid of force casting in EncodingConatiners. Should not be slower, maybe even faster.

heckj commented 3 months ago

Looks good - drops to a single comparison. Didn't benchmark it, but I expect it would be at least slightly faster.