Skip to content
Snippets Groups Projects
Commit 0d1025c5 authored by ticki's avatar ticki
Browse files

Take a reference to the stream instead of the stream itself (in `is_tty`

parent e63b6458
No related branches found
No related tags found
No related merge requests found
[package]
name = "termion"
version = "1.0.8"
version = "1.1.0"
authors = ["ticki <Ticki@users.noreply.github.com>"]
description = "A bindless library for manipulating terminals."
repository = "https://github.com/ticki/termion"
......
......@@ -3,7 +3,7 @@ use std::os::unix::io::AsRawFd;
/// Is this stream an TTY?
#[cfg(not(target_os = "redox"))]
pub fn is_tty<T: AsRawFd>(stream: T) -> bool {
pub fn is_tty<T: AsRawFd>(stream: &T) -> bool {
use libc;
unsafe { libc::isatty(stream.as_raw_fd()) == 1}
......@@ -11,7 +11,7 @@ pub fn is_tty<T: AsRawFd>(stream: T) -> bool {
/// This will panic.
#[cfg(target_os = "redox")]
pub fn is_tty<T: AsRawFd>(_stream: T) -> bool {
pub fn is_tty<T: AsRawFd>(_stream: &T) -> bool {
unimplemented!();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment