Join Nostr
2026-10-23 20:49:19 UTC

Shane Celis on Nostr: Another case I like to use `Cow` is for catch all error messages. Because if you ...

Another case I like to use `Cow` is for catch all error messages. Because if you don't have to format the string, the string is already in memory; just use it. But when you do need to add more information, you can.

This is not to say that catch all errors are good. They aren't. Use `thiserror` and don't reify strings at all. #rustlang