fishfolk / bones

An easy-to-use game engine for making real games.
https://fishfolk.org/development/bones/introduction/
Other
210 stars 20 forks source link

AssetServer::try_get panics if handle type is wrong #383

Closed MaxCWhitehead closed 4 months ago

MaxCWhitehead commented 4 months ago

try_get should return error if cast is not valid instead of panicking.

Currently returns None if handle does not map to an asset, but no graceful handling of mismatched type.