diff options
author | 张小白 <364772080@qq.com> | 2024-08-17 01:37:34 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-16 17:37:34 +0000 |
commit | 91d034ff8b53867143c005acfaa14609147c9a2c (patch) | |
tree | 9c362291f1de3ead97adf6a760fcb7c30c70f7b8 /alacritty_terminal/src/tty/windows/mod.rs | |
parent | 102b89a8d9ee6543f15f248c15383da7a4684c42 (diff) | |
download | alacritty-91d034ff8b53867143c005acfaa14609147c9a2c.tar.gz alacritty-91d034ff8b53867143c005acfaa14609147c9a2c.zip |
Make `ConPty` creation fallible
Diffstat (limited to 'alacritty_terminal/src/tty/windows/mod.rs')
-rw-r--r-- | alacritty_terminal/src/tty/windows/mod.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/alacritty_terminal/src/tty/windows/mod.rs b/alacritty_terminal/src/tty/windows/mod.rs index 6af162c8..32e24677 100644 --- a/alacritty_terminal/src/tty/windows/mod.rs +++ b/alacritty_terminal/src/tty/windows/mod.rs @@ -1,5 +1,5 @@ use std::ffi::OsStr; -use std::io::{self, Error, ErrorKind, Result}; +use std::io::{self, Result}; use std::iter::once; use std::os::windows::ffi::OsStrExt; use std::sync::mpsc::TryRecvError; @@ -35,7 +35,6 @@ pub struct Pty { pub fn new(config: &Options, window_size: WindowSize, _window_id: u64) -> Result<Pty> { conpty::new(config, window_size) - .ok_or_else(|| Error::new(ErrorKind::Other, "failed to spawn conpty")) } impl Pty { |