Skip to content

Version 0.13.0

Compare
Choose a tag to compare
@csnover csnover released this 27 Oct 03:29
· 46 commits to master since this release
v0.13.0
fd08c4e

Breaking changes

  • The stream specified by map_stream is now only used when reading the inner value(s) of the field/struct/enum it is applied to. Previously, the mapped stream would also be used for magic, padding, etc. when those directives were also applied to the same field or type, but this caused problems with re-borrowing the stream and made the scope of the directive confusing.

New features

  • Helper functions for reading and writing unsigned 24-bit integers have been added.

Bug fixes

  • It is now possible to use map_stream with count without causing a borrowck error.
  • It is now possible to pass args to a parse_with function that is not Copy without causing a borrowck error. (#185)
  • It is now possible to derive BinWrite on a type whose associated Args type implements Default but is not the unit type. (Thanks, @octylFractal!)
  • It is now possible to use PhantomData<T> with BinWrite where T is not BinWrite. (Thanks, @DCNick3! #230)
  • Calling custom_err on an error with a backtrace will now correctly return the original custom error. (#228)
  • Rust compiler and dependency versions have been updated to the correct minimum versions. (#224)
  • Calling Error::custom_err will now always return the custom error even if there is a backtrace associated with it. (#228)
  • Using self in top-level #[bw] directives now works as expected. (#232)
  • #[bw(assert)] now actually emits assertions on enums and data enum variants instead of silently accepting the directive without emitting any code.