1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-22 07:14:47 -05:00

Fix clippy warning (#6503)

This commit is contained in:
Bert Belder 2020-06-26 09:14:25 +02:00
parent d924ad36ac
commit 0c735ebdc7
No known key found for this signature in database
GPG key ID: 7A77887B2E2ED461

View file

@ -77,7 +77,7 @@ pub fn op_set_raw(
// For now, only stdin.
let handle = match &mut resource_holder.resource {
StreamResource::Stdin(_, _) => std::io::stdin().as_raw_handle(),
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() {
@ -245,7 +245,7 @@ pub fn op_isatty(
}
}
Err(StreamResource::FsFile(_)) => unreachable!(),
Err(StreamResource::Stdin(_, _)) => Ok(atty::is(atty::Stream::Stdin)),
Err(StreamResource::Stdin(..)) => Ok(atty::is(atty::Stream::Stdin)),
_ => Ok(false),
})?;
Ok(JsonOp::Sync(json!(isatty)))