Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(deps): update rust crate binrw to 0.13.0 #25

Merged
merged 1 commit into from
Oct 29, 2023
Merged

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Sep 22, 2023

Mend Renovate

This PR contains the following updates:

Package Type Update Change
binrw (source) dependencies minor 0.11.2 -> 0.13.0

Release Notes

jam1garner/binrw (binrw)

v0.13.0: Version 0.13.0

Compare Source

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.

v0.12.0: Version 0.12.0

Compare Source

Breaking changes

  • The default behaviour of FilePtr has been changed to always immediately seek to and read the pointed-to value. Helper functions have been added to the file_ptr module to support the common case of reading from an offset table. Additional helper functions and types will be added in future releases to improve support for file indirection.
  • The BinRead::after_parse API has been removed since it was rarely used, usually broken by manual BinRead implementations, and made it impossible to use borrowed values in arguments in some cases. For custom two-pass parsing, one alternative is to create an object that will store data that need to be used during the second pass, pass a mutable reference to that object as an argument to read_options, add data to that object during the first pass, then use the recorded data from the object to perform the required action for the second pass.
  • deref_now, offset_after, and postprocess_now have been removed as they were designed to control the after_parse API which no longer exists. Any field with a deref_now or postprocess_now directive can simply remove the directive to achieve equivalent functionality. Any struct that used offset_after should reorder the fields so the dependent field is after the offset location.

For more detail on these changes, see #​210.

  • Selected helper functions are no longer re-exported to the root of the crate. Access these helper functions, plus all the other helper functions that were never re-exported to the root, from the helpers module.
  • Using the undocumented internal variable this from an assert directive is no longer supported. Replace this with the supported self keyword instead.

New features

  • Helper functions for more efficient reading of offset tables have been added to the file_ptr module. These helpers can be combined with the seek_before directive to support both relative and absolute positioning of the pointed-to data. See the documentation for usage information and examples.
  • assert directives on structs, non-unit enums, and data variants can now access the constructed object using the self keyword. (Thanks, @​octylFractal!) (#​219)

Enhancements

  • Clone is no longer a required trait for arguments passed to parse_with functions. (Thanks, @​octylFractal!)
  • Clone is no longer a required trait for arguments passed to BinReaderExt methods.
  • BinRead is no longer a required trait for dereferencing a value from FilePtr. (#​218)
  • map and try_map functions can now mutably borrow values.
  • dbg now also prints information about any padding and alignment directives on a field.
  • Various documentation improvements.

Bug fixes

  • The count directive no longer attempts useless conversions. (Thanks, @​poliorcetics!) (#​206)
  • dbg now returns the correct position of a field when using pad_before or align_before. (#​188)
  • Parser errors are no longer discarded if a stream rewind fails. (#​215)
  • Implementation details of binrw will no longer cause borrow checker failures when passing borrowed arguments to child objects.

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Mend Renovate. View repository job log here.

@renovate renovate bot added the A-dependencies Area: Related to updating dependencies label Sep 22, 2023
@renovate renovate bot changed the title fix(deps): update rust crate binrw to 0.12.0 fix(deps): update rust crate binrw to 0.13.0 Oct 27, 2023
Copy link
Member

@aawsome aawsome left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@aawsome aawsome added this pull request to the merge queue Oct 29, 2023
Merged via the queue into main with commit f393123 Oct 29, 2023
50 checks passed
@aawsome aawsome deleted the renovate/binrw-0.x branch October 29, 2023 07:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-dependencies Area: Related to updating dependencies
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant