mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2025-02-10 20:19:07 +00:00
Define constants for the end of the ranges that exist within the settings BAR so we can use the range syntax in the match instead of manually checking against the start and end. This uses inclusive range (..=) syntax, since exclusive range pattern syntax (..) is experimental. Therefore, each range has a `_LAST` constant that is equal to the address of the last valid byte in that range (first + size - 1). Rewriting the matches in this way allows us to clean up the two clippy ignores and makes the code a bit easier to read. BUG=b:232838930 TEST=tools/clippy TEST=Boot x86-64 Crostini Change-Id: Ibb8b5ea055e598c19504b7b1b6753706ad458875 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3664280 Tested-by: kokoro <noreply+kokoro@google.com> Commit-Queue: Daniel Verkamp <dverkamp@chromium.org> Reviewed-by: Anton Romanov <romanton@google.com> |
||
---|---|---|
.. | ||
src | ||
Cargo.toml |