fix(deps): update rust crate binrw to 0.13.0 #25
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
0.11.2
->0.13.0
Release Notes
jam1garner/binrw (binrw)
v0.13.0
: Version 0.13.0Compare Source
Breaking changes
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
Bug fixes
map_stream
withcount
without causing a borrowck error.parse_with
function that is notCopy
without causing a borrowck error. (#185)BinWrite
on a type whose associatedArgs
type implementsDefault
but is not the unit type. (Thanks, @octylFractal!)PhantomData<T>
withBinWrite
whereT
is notBinWrite
. (Thanks, @DCNick3! #230)custom_err
on an error with a backtrace will now correctly return the original custom error. (#228)Error::custom_err
will now always return the custom error even if there is a backtrace associated with it. (#228)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.0Compare Source
Breaking changes
FilePtr
has been changed to always immediately seek to and read the pointed-to value. Helper functions have been added to thefile_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.BinRead::after_parse
API has been removed since it was rarely used, usually broken by manualBinRead
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 toread_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
, andpostprocess_now
have been removed as they were designed to control theafter_parse
API which no longer exists. Any field with aderef_now
orpostprocess_now
directive can simply remove the directive to achieve equivalent functionality. Any struct that usedoffset_after
should reorder the fields so the dependent field is after the offset location.For more detail on these changes, see #210.
helpers
module.this
from anassert
directive is no longer supported. Replacethis
with the supportedself
keyword instead.New features
file_ptr
module. These helpers can be combined with theseek_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 theself
keyword. (Thanks, @octylFractal!) (#219)Enhancements
Clone
is no longer a required trait for arguments passed toparse_with
functions. (Thanks, @octylFractal!)Clone
is no longer a required trait for arguments passed toBinReaderExt
methods.BinRead
is no longer a required trait for dereferencing a value fromFilePtr
. (#218)map
andtry_map
functions can now mutably borrow values.dbg
now also prints information about any padding and alignment directives on a field.Bug fixes
count
directive no longer attempts useless conversions. (Thanks, @poliorcetics!) (#206)dbg
now returns the correct position of a field when usingpad_before
oralign_before
. (#188)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.
This PR has been generated by Mend Renovate. View repository job log here.