diff options
author | Jesse Luehrs <doy@tozt.net> | 2021-03-09 02:53:24 -0500 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2021-03-09 02:56:10 -0500 |
commit | 0cf66f816712e8e8adb941fff57823625611370a (patch) | |
tree | e6e2ac14a754084a8d7cf719e8d37c1a88d6d84e /src/blocking/input.rs | |
parent | 4fc328e1dfb79a2cba14f603a5dd175d6029f30f (diff) | |
download | textmode-0cf66f816712e8e8adb941fff57823625611370a.tar.gz textmode-0cf66f816712e8e8adb941fff57823625611370a.zip |
handle errors properly in raw guard
Diffstat (limited to 'src/blocking/input.rs')
-rw-r--r-- | src/blocking/input.rs | 4 |
1 files changed, 2 insertions, 2 deletions
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 { |