summary refs log tree commit diff
path: root/Cargo.lock
diff options
context:
space:
mode:
authorZach Reizner <zachr@google.com>2018-02-27 22:22:35 -0800
committerchrome-bot <chrome-bot@chromium.org>2018-03-07 16:54:46 -0800
commit25c6bc137ecfd1f608993a3d2f24c5736c5c186a (patch)
tree8fb7b1cfa49bddbadf4f059e7508c5a7ee5b730f /Cargo.lock
parenta5358e8ffd53d04750dc2c3376abc3fb5df92659 (diff)
downloadcrosvm-25c6bc137ecfd1f608993a3d2f24c5736c5c186a.tar
crosvm-25c6bc137ecfd1f608993a3d2f24c5736c5c186a.tar.gz
crosvm-25c6bc137ecfd1f608993a3d2f24c5736c5c186a.tar.bz2
crosvm-25c6bc137ecfd1f608993a3d2f24c5736c5c186a.tar.lz
crosvm-25c6bc137ecfd1f608993a3d2f24c5736c5c186a.tar.xz
crosvm-25c6bc137ecfd1f608993a3d2f24c5736c5c186a.tar.zst
crosvm-25c6bc137ecfd1f608993a3d2f24c5736c5c186a.zip
sys_util: custom derive for PollToken
Using an enum implementing PollToken is the recommended way to use
PollContext, but writing the trait impls for each enum is mechanical yet
error prone. This is a perfect candidate for a custom derive, which
automates away the process using a simple derive attribute on an enum.

BUG=chromium:816692
TEST=cargo test -p sys_util

Change-Id: If21d0f94f9af4b4f6cef1f24c78fc36b50471053
Reviewed-on: https://chromium-review.googlesource.com/940865
Commit-Ready: Zach Reizner <zachr@chromium.org>
Tested-by: Zach Reizner <zachr@chromium.org>
Reviewed-by: Chirantan Ekbote <chirantan@chromium.org>
Diffstat (limited to 'Cargo.lock')
-rw-r--r--Cargo.lock5
1 files changed, 5 insertions, 0 deletions
diff --git a/Cargo.lock b/Cargo.lock
index 59a26d0..fc43a11 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -182,6 +182,10 @@ dependencies = [
 ]
 
 [[package]]
+name = "poll_token_derive"
+version = "0.1.0"
+
+[[package]]
 name = "protobuf"
 version = "1.4.3"
 source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -237,6 +241,7 @@ dependencies = [
  "data_model 0.1.0",
  "gcc 0.3.54 (registry+https://github.com/rust-lang/crates.io-index)",
  "libc 0.2.34 (registry+https://github.com/rust-lang/crates.io-index)",
+ "poll_token_derive 0.1.0",
  "syscall_defines 0.1.0",
 ]