diff options
author | Kitson Kelly <me@kitsonkelly.com> | 2020-10-12 22:25:25 +1100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-12 22:25:25 +1100 |
commit | 26639b3bac463768c65f7fc40a1c53317549e1eb (patch) | |
tree | 4164b44e0530f6ec2d6316028aca65a04f320751 /cli/ops/tty.rs | |
parent | e877b36072039811066726ab1619e7b5142f5680 (diff) |
chore(cli): remove dead code (#7941)
Diffstat (limited to 'cli/ops/tty.rs')
-rw-r--r-- | cli/ops/tty.rs | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/cli/ops/tty.rs b/cli/ops/tty.rs index 01ed73a05..52c89ee11 100644 --- a/cli/ops/tty.rs +++ b/cli/ops/tty.rs @@ -90,7 +90,6 @@ fn op_set_raw( // For now, only stdin. let handle = match &mut resource_holder.resource { - StreamResource::Stdin(..) => std::io::stdin().as_raw_handle(), StreamResource::FsFile(ref mut option_file_metadata) => { if let Some((tokio_file, metadata)) = option_file_metadata.take() { match tokio_file.try_into_std() { @@ -156,9 +155,6 @@ fn op_set_raw( if is_raw { let (raw_fd, maybe_tty_mode) = match &mut resource_holder.unwrap().resource { - StreamResource::Stdin(_, ref mut metadata) => { - (std::io::stdin().as_raw_fd(), &mut metadata.mode) - } StreamResource::FsFile(Some((f, ref mut metadata))) => { (f.as_raw_fd(), &mut metadata.tty.mode) } @@ -198,9 +194,6 @@ fn op_set_raw( // Try restore saved mode. let (raw_fd, maybe_tty_mode) = match &mut resource_holder.unwrap().resource { - StreamResource::Stdin(_, ref mut metadata) => { - (std::io::stdin().as_raw_fd(), &mut metadata.mode) - } StreamResource::FsFile(Some((f, ref mut metadata))) => { (f.as_raw_fd(), &mut metadata.tty.mode) } @@ -253,7 +246,6 @@ fn op_isatty( } } Err(StreamResource::FsFile(_)) => unreachable!(), - Err(StreamResource::Stdin(..)) => Ok(atty::is(atty::Stream::Stdin)), _ => Ok(false), })?; Ok(json!(isatty)) |