From 91d034ff8b53867143c005acfaa14609147c9a2c Mon Sep 17 00:00:00 2001 From: 张小白 <364772080@qq.com> Date: Sat, 17 Aug 2024 01:37:34 +0800 Subject: Make `ConPty` creation fallible --- alacritty_terminal/src/tty/windows/mod.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'alacritty_terminal/src/tty/windows/mod.rs') 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 { conpty::new(config, window_size) - .ok_or_else(|| Error::new(ErrorKind::Other, "failed to spawn conpty")) } impl Pty { -- cgit v1.2.3-54-g00ecf