When using `.expect()` in #rustlang, I'm still not confident in what message to write.
Are there any best practices?
Should it describe the error? Or should it describe what was expected? e.g. "Could not read file" vs "Reading file" vs "File is read".
`expect` kinda indicates the latter. But it makes little sense for the consumer who then sees that error.
Maybe we should see it this way:
The message in `.expect()` is way more important for the developer than the consumer, because calling `expect` indicates a possible error _that should never happen_.
So the developer will see this far more often than the consumer (actually a consumer should never see this!).
This Mastodon instance is for people interested in technology. Discussions aren't limited to technology, because tech folks shouldn't be limited to technology either!