crosvm/base
Chirantan Ekbote 90163ceb41 base: Use trait objects for ioctls
Having these function be generic over F: AsRawDescriptor with a &F
parameter means that we cannot use trait objects with them because the
compiler complains that `dyn AsRawDescriptor` does not have a
compile-time size.

Instead change the generic parameter to be a trait object.  We're
already doing this in a few other places and we're about to make a
syscall so the cost of dynamic dispatch is probably overshadowed by the
cost of syscall itself.

BUG=b:180565632
TEST=unit tests

Change-Id: I38f696b621411e7cf3e13af71e426865b6509f6f
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2706369
Tested-by: Chirantan Ekbote <chirantan@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Auto-Submit: Chirantan Ekbote <chirantan@chromium.org>
Commit-Queue: Stephen Barber <smbarber@chromium.org>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Stephen Barber <smbarber@chromium.org>
Reviewed-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
2021-02-19 19:23:33 +00:00
..
src base: Use trait objects for ioctls 2021-02-19 19:23:33 +00:00
.build_test_serial build_test: misc options, improvements, amd bug fixes 2020-10-15 13:40:32 +00:00
Cargo.toml Refactor cros_async interface to avoid RawFd. 2020-11-10 11:40:50 +00:00