rust-lang-deprecated / error-chain

Error boilerplate for Rust
Apache License 2.0
729 stars 111 forks source link

Shrink the size of all `Error` types #225

Open alexcrichton opened 6 years ago

alexcrichton commented 6 years ago

This commit improves the in-memory size of Error from 7 pointers to 1 pointer. Errors are in general relatively rare in applications and having a huge error type ends up generating lots of instructions for moves and such, so this PR optimizes for size and passing around errors rather than creating errors.

Yamakaky commented 6 years ago

Nice! You just have to update the tests which use pattern matching on the kind. It's also a breaking change so could you update the CHANGELOG?

alexcrichton commented 6 years ago

Updated

Yamakaky commented 6 years ago

Could you rebase please?

alexcrichton commented 6 years ago

Sure thing, done now

Lymia commented 6 years ago

When might this pull request be land/be merged?