thehydroimpulse/nanomsg.rs — pull request #59 by blabaere (2014-11-17 21:03:22+00:00)
Title: Avoid string copy when allocating NanoError

Uses c_str_to_static_slice to get the description instead of creating a copy.
Makes the description field of NanoError a &'static str instead of SendStr.
Implements manually fmt::Show instead of the to_str function.
Moves from_nn_errno inside NanoError impl.

This makes NanoError look a little bit more like:
http://alexcrichton.com/ssh2-rs/src/ssh2/home/travis/build/alexcrichton/ssh2-rs/src/error.rs.html
http://doc.rust-lang.org/src/std/home/rustbuild/src/rust-buildbot/slave/nightly-linux/build/src/libstd/io/mod.rs.html#297-305