From 0cf66f816712e8e8adb941fff57823625611370a Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Tue, 9 Mar 2021 02:53:24 -0500 Subject: handle errors properly in raw guard --- src/blocking/input.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/blocking') diff --git a/src/blocking/input.rs b/src/blocking/input.rs index ff69eda..18e349a 100644 --- a/src/blocking/input.rs +++ b/src/blocking/input.rs @@ -15,8 +15,8 @@ pub struct Input { #[allow(clippy::new_without_default)] impl Input { - pub fn new() -> (Self, crate::RawGuard) { - (Self::new_without_raw(), crate::RawGuard::new()) + pub fn new() -> Result<(Self, crate::RawGuard)> { + Ok((Self::new_without_raw(), crate::RawGuard::new()?)) } pub fn new_without_raw() -> Self { -- cgit v1.2.3-54-g00ecf