]> git.lizzy.rs Git - rust.git/blobdiff - src/libterm/lib.rs
Register new snapshots
[rust.git] / src / libterm / lib.rs
index 33e61b97420869ed785bb0ddc3a981ed5a514cd0..472501754859892ed2b859ad85676def460d9a74 100644 (file)
 #[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>)
         }
     }
 }