@@ -65,51 +65,51 @@ mod win;
65
65
#[ cfg( not( windows) ) ]
66
66
/// Return a Terminal wrapping stdout, or None if a terminal couldn't be
67
67
/// opened.
68
- pub fn stdout ( ) -> Option < ~ Terminal < ~ Writer : Send > : Send > {
69
- let ti: Option < TerminfoTerminal < ~ Writer : Send > >
70
- = Terminal :: new ( ~ std:: io:: stdout ( ) as ~ Writer : Send ) ;
71
- ti. map ( |t| ~ t as ~ Terminal < ~ Writer : Send > : Send )
68
+ pub fn stdout ( ) -> Option < Box < Terminal < Box < Writer : Send > > : Send > > {
69
+ let ti: Option < TerminfoTerminal < Box < Writer : Send > > >
70
+ = Terminal :: new ( box std:: io:: stdout ( ) as Box < Writer : Send > ) ;
71
+ ti. map ( |t| box t as Box < Terminal < Box < Writer : Send > : Send > : Send > )
72
72
}
73
73
74
74
#[ cfg( windows) ]
75
75
/// Return a Terminal wrapping stdout, or None if a terminal couldn't be
76
76
/// opened.
77
- pub fn stdout ( ) -> Option < ~ Terminal < ~ Writer : Send > : Send > {
78
- let ti: Option < TerminfoTerminal < ~ Writer : Send > >
79
- = Terminal :: new ( ~ std:: io:: stdout ( ) as ~ Writer : Send ) ;
77
+ pub fn stdout ( ) -> Option < Box < Terminal < Box < Writer : Send > : Send > : Send > > {
78
+ let ti: Option < TerminfoTerminal < Box < Writer : Send > > >
79
+ = Terminal :: new ( box std:: io:: stdout ( ) as Box < Writer : Send > ) ;
80
80
81
81
match ti {
82
- Some ( t) => Some ( ~ t as ~ Terminal < ~ Writer : Send > : Send ) ,
82
+ Some ( t) => Some ( box t as Box < Terminal < Box < Writer : Send > : Send > : Send > ) ,
83
83
None => {
84
- let wc: Option < WinConsole < ~ Writer : Send > >
85
- = Terminal :: new ( ~ std:: io:: stdout ( ) as ~ Writer : Send ) ;
86
- wc. map ( |w| ~ w as ~ Terminal < ~ Writer : Send > : Send )
84
+ let wc: Option < WinConsole < Box < Writer : Send > > >
85
+ = Terminal :: new ( box std:: io:: stdout ( ) as Box < Writer : Send > ) ;
86
+ wc. map ( |w| box w as Box < Terminal < Box < Writer : Send > : Send > : Send > )
87
87
}
88
88
}
89
89
}
90
90
91
91
#[ cfg( not( windows) ) ]
92
92
/// Return a Terminal wrapping stderr, or None if a terminal couldn't be
93
93
/// opened.
94
- pub fn stderr ( ) -> Option < ~ Terminal < ~ Writer : Send > : Send > {
95
- let ti: Option < TerminfoTerminal < ~ Writer : Send > >
96
- = Terminal :: new ( ~ std:: io:: stderr ( ) as ~ Writer : Send ) ;
97
- ti. map ( |t| ~ t as ~ Terminal < ~ Writer : Send > : Send )
94
+ pub fn stderr ( ) -> Option < Box < Terminal < Box < Writer : Send > : Send > : Send > : Send > {
95
+ let ti: Option < TerminfoTerminal < Box < Writer : Send > > >
96
+ = Terminal :: new ( box std:: io:: stderr ( ) as Box < Writer : Send > ) ;
97
+ ti. map ( |t| box t as Box < Terminal < Box < Writer : Send > : Send > : Send > )
98
98
}
99
99
100
100
#[ cfg( windows) ]
101
101
/// Return a Terminal wrapping stderr, or None if a terminal couldn't be
102
102
/// opened.
103
- pub fn stderr ( ) -> Option < ~ Terminal < ~ Writer : Send > : Send > {
104
- let ti: Option < TerminfoTerminal < ~ Writer : Send > >
105
- = Terminal :: new ( ~ std:: io:: stderr ( ) as ~ Writer : Send ) ;
103
+ pub fn stderr ( ) -> Option < Box < Terminal < Box < Writer : Send > : Send > : Send > > {
104
+ let ti: Option < TerminfoTerminal < Box < Writer : Send > > >
105
+ = Terminal :: new ( box std:: io:: stderr ( ) as Box < Writer : Send > ) ;
106
106
107
107
match ti {
108
- Some ( t) => Some ( ~ t as ~ Terminal < ~ Writer : Send > : Send ) ,
108
+ Some ( t) => Some ( box t as Box < Terminal < Box < Writer : Send > : Send > : Send > ) ,
109
109
None => {
110
- let wc: Option < WinConsole < ~ Writer : Send > >
111
- = Terminal :: new ( ~ std:: io:: stderr ( ) as ~ Writer : Send ) ;
112
- wc. map ( |w| ~ w as ~ Terminal < ~ Writer : Send > : Send )
110
+ let wc: Option < WinConsole < Box < Writer : Send > > >
111
+ = Terminal :: new ( box std:: io:: stderr ( ) as Box < Writer : Send > ) ;
112
+ wc. map ( |w| box w as Box < Terminal < Box < Writer : Send > : Send > : Send > )
113
113
}
114
114
}
115
115
}
0 commit comments