diff options
Diffstat (limited to 'src/libterm/lib.rs')
| -rw-r--r-- | src/libterm/lib.rs | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/src/libterm/lib.rs b/src/libterm/lib.rs index 33e61b97420..47250175485 100644 --- a/src/libterm/lib.rs +++ b/src/libterm/lib.rs @@ -68,25 +68,25 @@ mod win; #[cfg(not(windows))] /// Return a Terminal wrapping stdout, or None if a terminal couldn't be /// opened. -pub fn stdout() -> Option<Box<Terminal<Box<Writer:Send>>:Send>> { - let ti: Option<TerminfoTerminal<Box<Writer:Send>>> - = Terminal::new(box std::io::stdout() as Box<Writer:Send>); - ti.map(|t| box t as Box<Terminal<Box<Writer:Send>:Send>:Send>) +pub fn stdout() -> Option<Box<Terminal<Box<Writer + Send>> + Send>> { + let ti: Option<TerminfoTerminal<Box<Writer + Send>>> + = Terminal::new(box std::io::stdout() as Box<Writer + Send>); + ti.map(|t| box t as Box<Terminal<Box<Writer + Send> + Send> + Send>) } #[cfg(windows)] /// Return a Terminal wrapping stdout, or None if a terminal couldn't be /// opened. -pub fn stdout() -> Option<Box<Terminal<Box<Writer:Send>:Send>:Send>> { - let ti: Option<TerminfoTerminal<Box<Writer:Send>>> - = Terminal::new(box std::io::stdout() as Box<Writer:Send>); +pub fn stdout() -> Option<Box<Terminal<Box<Writer + Send> + Send> + Send>> { + let ti: Option<TerminfoTerminal<Box<Writer + Send>>> + = Terminal::new(box std::io::stdout() as Box<Writer + Send>); match ti { - Some(t) => Some(box t as Box<Terminal<Box<Writer:Send>:Send>:Send>), + Some(t) => Some(box t as Box<Terminal<Box<Writer + Send> + Send> + Send>), None => { - let wc: Option<WinConsole<Box<Writer:Send>>> - = Terminal::new(box std::io::stdout() as Box<Writer:Send>); - wc.map(|w| box w as Box<Terminal<Box<Writer:Send>:Send>:Send>) + let wc: Option<WinConsole<Box<Writer + Send>>> + = Terminal::new(box std::io::stdout() as Box<Writer + Send>); + wc.map(|w| box w as Box<Terminal<Box<Writer + Send> + Send> + Send>) } } } @@ -94,25 +94,25 @@ pub fn stdout() -> Option<Box<Terminal<Box<Writer:Send>:Send>:Send>> { #[cfg(not(windows))] /// Return a Terminal wrapping stderr, or None if a terminal couldn't be /// opened. -pub fn stderr() -> Option<Box<Terminal<Box<Writer:Send>:Send>:Send>:Send> { - let ti: Option<TerminfoTerminal<Box<Writer:Send>>> - = Terminal::new(box std::io::stderr() as Box<Writer:Send>); - ti.map(|t| box t as Box<Terminal<Box<Writer:Send>:Send>:Send>) +pub fn stderr() -> Option<Box<Terminal<Box<Writer + Send> + Send> + Send> + Send> { + let ti: Option<TerminfoTerminal<Box<Writer + Send>>> + = Terminal::new(box std::io::stderr() as Box<Writer + Send>); + ti.map(|t| box t as Box<Terminal<Box<Writer + Send> + Send> + Send>) } #[cfg(windows)] /// Return a Terminal wrapping stderr, or None if a terminal couldn't be /// opened. -pub fn stderr() -> Option<Box<Terminal<Box<Writer:Send>:Send>:Send>> { - let ti: Option<TerminfoTerminal<Box<Writer:Send>>> - = Terminal::new(box std::io::stderr() as Box<Writer:Send>); +pub fn stderr() -> Option<Box<Terminal<Box<Writer + Send> + Send> + Send>> { + let ti: Option<TerminfoTerminal<Box<Writer + Send>>> + = Terminal::new(box std::io::stderr() as Box<Writer + Send>); match ti { - Some(t) => Some(box t as Box<Terminal<Box<Writer:Send>:Send>:Send>), + Some(t) => Some(box t as Box<Terminal<Box<Writer + Send> + Send> + Send>), None => { - let wc: Option<WinConsole<Box<Writer:Send>>> - = Terminal::new(box std::io::stderr() as Box<Writer:Send>); - wc.map(|w| box w as Box<Terminal<Box<Writer:Send>:Send>:Send>) + let wc: Option<WinConsole<Box<Writer + Send>>> + = Terminal::new(box std::io::stderr() as Box<Writer + Send>); + wc.map(|w| box w as Box<Terminal<Box<Writer + Send> + Send> + Send>) } } } |
