summaryrefslogtreecommitdiff
path: root/src/tty/windows/conpty.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/tty/windows/conpty.rs')
-rw-r--r--src/tty/windows/conpty.rs15
1 files changed, 3 insertions, 12 deletions
diff --git a/src/tty/windows/conpty.rs b/src/tty/windows/conpty.rs
index 6c74df7f..7383118f 100644
--- a/src/tty/windows/conpty.rs
+++ b/src/tty/windows/conpty.rs
@@ -214,10 +214,7 @@ pub fn new<'a>(
cmdline.insert(0, initial_command.program().into());
// Warning, here be borrow hell
- let cwd = options
- .working_dir
- .as_ref()
- .map(|dir| canonicalize(dir).unwrap());
+ let cwd = options.working_dir.as_ref().map(|dir| canonicalize(dir).unwrap());
let cwd = cwd.as_ref().map(|dir| dir.to_str().unwrap());
// Create the client application, using startup info containing ConPTY info
@@ -250,10 +247,7 @@ pub fn new<'a>(
let conin = EventedAnonWrite::new(conin);
let conout = EventedAnonRead::new(conout);
- let agent = Conpty {
- handle: pty_handle,
- api,
- };
+ let agent = Conpty { handle: pty_handle, api };
Some(Pty {
handle: super::PtyHandle::Conpty(ConptyHandle::new(agent)),
@@ -279,10 +273,7 @@ fn coord_from_sizeinfo(sizeinfo: &SizeInfo) -> Option<COORD> {
let lines = sizeinfo.lines().0;
if cols <= i16::MAX as usize && lines <= i16::MAX as usize {
- Some(COORD {
- X: sizeinfo.cols().0 as i16,
- Y: sizeinfo.lines().0 as i16,
- })
+ Some(COORD { X: sizeinfo.cols().0 as i16, Y: sizeinfo.lines().0 as i16 })
} else {
None
}