News for hackers. Stuff that matters.
Re:Announcing Rust 1.13 by ameliaquining on Thursday November 10, 2016 @06:44PM (#12925827)
You often won't need to change the error object from what foo() returns; Rust errors are generally structs or enums, rather than non-machine-readable strings. But if you do need to change it, it looks like this:

  foo().map_err(MyError::new)?
Re:Announcing Rust 1.13 by cpuguy83 on Thursday November 10, 2016 @09:39PM (#12927009)
go errors are generally backed by structs as well (though not necessarily), even `fmt.Errorf("some error")` is a struct (called `errorString`).

`Error() string` is just the interface that things that want to be errors must implement, which ideally gives you the human readable version of the error.

Re:Announcing Rust 1.13 by saghm on Thursday November 10, 2016 @10:11PM (#12927267)
In Rust, I think it's more idiomatic to just implement the `Display` trait on you error type so that you can generate the string when you need it instead of at the time the error occurs