mneumann / rust-msgpack

[DEPRECATED] msgpack.org implementation for Rust language. Please use https://github.com/3Hren/msgpack-rust
121 stars 31 forks source link

Move to unboxed closures #37

Closed drbawb closed 9 years ago

drbawb commented 9 years ago

This updates the code to work with the latest rust-nightly. Wherever closures are taken I added a trait-bound by for the corresponding unboxed closure type.

The 2nd commit fixes up some issues where rustc did not seem to agree w/ nesting closures. I ended up storing intermediate results and then calling the closure; not sure if there's a cleaner way to achieve this.

(Tested with: rustc 0.13.0-dev (92e9e70d1 2014-12-15 19:12:44 +0000))