Skip to content

Commit

Permalink
rustfmt libterm
Browse files Browse the repository at this point in the history
  • Loading branch information
nrc committed Jan 19, 2016
1 parent 0888649 commit f368f43
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/libterm/lib.rs
Expand Up @@ -74,9 +74,9 @@ pub mod terminfo;
mod win;

/// Alias for stdout terminals.
pub type StdoutTerminal = Terminal<Output=Stdout> + Send;
pub type StdoutTerminal = Terminal<Output = Stdout> + Send;
/// Alias for stderr terminals.
pub type StderrTerminal = Terminal<Output=Stderr> + Send;
pub type StderrTerminal = Terminal<Output = Stderr> + Send;

#[cfg(not(windows))]
/// Return a Terminal wrapping stdout, or None if a terminal couldn't be
Expand Down
4 changes: 2 additions & 2 deletions src/libterm/terminfo/mod.rs
Expand Up @@ -151,7 +151,7 @@ pub struct TerminfoTerminal<T> {
ti: TermInfo,
}

impl<T: Write+Send> Terminal for TerminfoTerminal<T> {
impl<T: Write + Send> Terminal for TerminfoTerminal<T> {
type Output = T;
fn fg(&mut self, color: color::Color) -> io::Result<bool> {
let color = self.dim_if_necessary(color);
Expand Down Expand Up @@ -220,7 +220,7 @@ impl<T: Write+Send> Terminal for TerminfoTerminal<T> {
}
}

impl<T: Write+Send> TerminfoTerminal<T> {
impl<T: Write + Send> TerminfoTerminal<T> {
/// Create a new TerminfoTerminal with the given TermInfo and Write.
pub fn new_with_terminfo(out: T, terminfo: TermInfo) -> TerminfoTerminal<T> {
let nc = if terminfo.strings.contains_key("setaf") &&
Expand Down
4 changes: 2 additions & 2 deletions src/libterm/win.rs
Expand Up @@ -91,7 +91,7 @@ fn bits_to_color(bits: u16) -> color::Color {
color | (bits & 0x8) // copy the hi-intensity bit
}

impl<T: Write+Send+'static> WinConsole<T> {
impl<T: Write + Send + 'static> WinConsole<T> {
fn apply(&mut self) {
let _unused = self.buf.flush();
let mut accum: WORD = 0;
Expand Down Expand Up @@ -148,7 +148,7 @@ impl<T: Write> Write for WinConsole<T> {
}
}

impl<T: Write+Send+'static> Terminal for WinConsole<T> {
impl<T: Write + Send + 'static> Terminal for WinConsole<T> {
type Output = T;

fn fg(&mut self, color: color::Color) -> io::Result<bool> {
Expand Down

0 comments on commit f368f43

Please sign in to comment.