diff options
author | Alyssa Ross <hi@alyssa.is> | 2020-06-12 10:11:06 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2020-07-02 12:33:05 +0000 |
commit | 544cb6bcda8654747e2de3d67c25182f3850ab2c (patch) | |
tree | bf72d04500aa85762c4f1b6b4b80153d17077831 /devices/src/virtio/input/mod.rs | |
parent | f57267d7e998ffec48794723b188b35489acfeec (diff) | |
download | crosvm-544cb6bcda8654747e2de3d67c25182f3850ab2c.tar crosvm-544cb6bcda8654747e2de3d67c25182f3850ab2c.tar.gz crosvm-544cb6bcda8654747e2de3d67c25182f3850ab2c.tar.bz2 crosvm-544cb6bcda8654747e2de3d67c25182f3850ab2c.tar.lz crosvm-544cb6bcda8654747e2de3d67c25182f3850ab2c.tar.xz crosvm-544cb6bcda8654747e2de3d67c25182f3850ab2c.tar.zst crosvm-544cb6bcda8654747e2de3d67c25182f3850ab2c.zip |
Make lots of things Debug
Diffstat (limited to 'devices/src/virtio/input/mod.rs')
-rw-r--r-- | devices/src/virtio/input/mod.rs | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/devices/src/virtio/input/mod.rs b/devices/src/virtio/input/mod.rs index 7c9418c..7d5b91a 100644 --- a/devices/src/virtio/input/mod.rs +++ b/devices/src/virtio/input/mod.rs @@ -243,6 +243,12 @@ pub struct VirtioInputConfig { axis_info: BTreeMap<u16, virtio_input_absinfo>, } +impl std::fmt::Debug for VirtioInputConfig { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + write!(f, "VirtioInputConfig {{ .. }}") + } +} + impl VirtioInputConfig { fn new( device_ids: virtio_input_device_ids, @@ -534,7 +540,7 @@ impl<T: EventSource> Worker<T> { } /// Virtio input device - +#[derive(Debug)] pub struct Input<T: EventSource> { kill_evt: Option<EventFd>, worker_thread: Option<thread::JoinHandle<Worker<T>>>, @@ -557,7 +563,7 @@ impl<T: EventSource> Drop for Input<T> { impl<T> VirtioDevice for Input<T> where - T: 'static + EventSource + Send, + T: 'static + EventSource + Send + std::fmt::Debug, { fn keep_fds(&self) -> Vec<RawFd> { if let Some(source) = &self.source { |