From 47153d1a723cec5313ce4d529b86affc2fb48877 Mon Sep 17 00:00:00 2001 From: Noa Date: Wed, 22 Jan 2025 17:26:41 -0600 Subject: [PATCH] try something --- tests/virtual_device.rs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tests/virtual_device.rs b/tests/virtual_device.rs index 2d8f918..926d159 100644 --- a/tests/virtual_device.rs +++ b/tests/virtual_device.rs @@ -14,9 +14,11 @@ async fn test_virtual_device_actually_emits() -> Result<(), Box> { let virtual_device_name = "fake-keyboard"; keys.insert(KeyCode::KEY_ESC); - let mut device = VirtualDevice::builder()? + let mut device = VirtualDevice::builder() + .unwrap() .name(virtual_device_name) - .with_keys(&keys)? + .with_keys(&keys) + .unwrap() .build() .unwrap(); @@ -38,7 +40,7 @@ async fn test_virtual_device_actually_emits() -> Result<(), Box> { // listen for events on the listen device let listener = tokio::spawn(async move { // try to read the key code that will be sent through virtual device - let mut events = listen_device.into_event_stream()?; + let mut events = listen_device.into_event_stream().unwrap(); events.next_event().await }); @@ -46,7 +48,7 @@ async fn test_virtual_device_actually_emits() -> Result<(), Box> { let down_event = InputEvent::new(type_.0, code, 10); device.emit(&[down_event]).unwrap(); - let event = timeout(Duration::from_secs(1), listener).await???; + let event = timeout(Duration::from_secs(1), listener).await.unwrap(); assert_eq!(down_event.event_type(), event.event_type()); assert_eq!(down_event.code(), event.code());