crosvm/crosvm_plugin
Chirantan Ekbote 1a9f2a5454 sys_util: Refactor IntoIovec
The original stated purpose of this trait was to reduce memory
allocations but having the `into_iovec` method return a Vec kind of
defeats that purpose.

Refactor the trait so that it can either convert a T into an iovec or
convert a &[T] into a &[iovec].  Implement the trait for VolatileSlice,
IoSlice, and IoSliceMut and update all the callers.

BUG=none
TEST=unit tests

Cq-Depend: chromium:2210272
Change-Id: I9d0d617a23030d241d50411f4a5a16e7cba4bcee
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2208527
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Zach Reizner <zachr@chromium.org>
Commit-Queue: Chirantan Ekbote <chirantan@chromium.org>
Tested-by: Chirantan Ekbote <chirantan@chromium.org>
2020-05-28 07:14:58 +00:00
..
src sys_util: Refactor IntoIovec 2020-05-28 07:14:58 +00:00
Cargo.toml crosvm: compile out stats 2019-11-02 03:56:58 +00:00
crosvm.h crosvm: add handling for hyperv exits 2020-03-05 19:01:24 +00:00