aboutsummaryrefslogtreecommitdiffstats
path: root/src/input.rs
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2021-03-09 02:53:24 -0500
committerJesse Luehrs <doy@tozt.net>2021-03-09 02:56:10 -0500
commit0cf66f816712e8e8adb941fff57823625611370a (patch)
treee6e2ac14a754084a8d7cf719e8d37c1a88d6d84e /src/input.rs
parent4fc328e1dfb79a2cba14f603a5dd175d6029f30f (diff)
downloadtextmode-0cf66f816712e8e8adb941fff57823625611370a.tar.gz
textmode-0cf66f816712e8e8adb941fff57823625611370a.zip
handle errors properly in raw guard
Diffstat (limited to 'src/input.rs')
-rw-r--r--src/input.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/input.rs b/src/input.rs
index 8bd3b60..bc16568 100644
--- a/src/input.rs
+++ b/src/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 {