mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2024-11-25 05:03:05 +00:00
fc3e5c9b80
PunchHole should be originally immutable method since the file_punch_hole() for both unix and windows are immutable function which do not change the underlining file offset. QcowFile is the only object which requires mutability to punch a hole to its file. This commit introduce a new PunchHoleMut and the existing PunchHole traits and make PunchHole trait immutable. This unblocks b/269981962 which tries to punch a hole to non-mut reference File. This also remove useless top level defined functions in base crate. BUG=b:269981962 TEST=cargo build --feature=qcow TEST=./tools/run_test2 Change-Id: I8333d13f4adc6dff319c0ddababe400d5e995141 Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4269718 Reviewed-by: David Stevens <stevensd@chromium.org> Reviewed-by: Noah Gold <nkgold@google.com> Commit-Queue: Shin Kawamura <kawasin@google.com> |
||
---|---|---|
.. | ||
src | ||
Cargo.toml |