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

fix(assets): Make AssetServer::try_get return Result<Option, SchemaMismatchError> #385

Closed MaxCWhitehead closed 4 months ago

MaxCWhitehead commented 4 months ago

Now it will not panic if cast fails.

closes #383

MaxCWhitehead commented 4 months ago

Haha no worries I was wondering about the same thing - I also considered if we should have just a result with two error types, but I think Option will probably make for cleaner usage. Will do