crosvm/sys_util
Chirantan Ekbote 6daa9a5a2c data_model: Replace as_iobuf() with AsRef and AsMut
IoSliceMut doesn't currently provide a way to access the fields of the
internal iovec. Additionally, the as_iobuf() method returns a copy of
the iovec rather than a reference, which can cause hard to diagnose
issues.

Replace the as_iobuf() method with implementations of the AsRef and
AsMut traits. This should also make it easier to hide these impls behind
a `#[cfg(unix)]` in the future.

BUG=none
TEST=unit tests

Change-Id: I58f8c5f579f3d03ec6e612a32343e8423eced8ae
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2571147
Reviewed-by: Noah Gold <nkgold@google.com>
Reviewed-by: Dylan Reid <dgreid@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Chirantan Ekbote <chirantan@chromium.org>
2020-12-09 14:31:11 +00:00
..
poll_token_derive
src data_model: Replace as_iobuf() with AsRef and AsMut 2020-12-09 14:31:11 +00:00
.build_test_serial build_test: misc options, improvements, amd bug fixes 2020-10-15 13:40:32 +00:00
Cargo.toml