rune
rune copied to clipboard
Add default `T=()` to `rune::Result`
Allows to do:
type Result<T = (), E = anyhow::Error> = core::result::Result<T, E>;
fn some_test -> Result {
Ok(())
}
Though I also get not doing this, you really don't save much, but not having to say Result<()>.
Might be a bit too unusual for my taste.
Strongest precedent I can think of is std::fmt::Result, but then it's set to exactly value. Even there it's a bit odd. 🤔