@@ -66,11 +66,6 @@ pub trait FileDescriptor: std::fmt::Debug + Any {
66
66
fn is_tty ( & self , _communicate_allowed : bool ) -> bool {
67
67
false
68
68
}
69
-
70
- #[ cfg( unix) ]
71
- fn as_unix_host_fd ( & self ) -> Option < i32 > {
72
- None
73
- }
74
69
}
75
70
76
71
impl dyn FileDescriptor {
@@ -150,12 +145,6 @@ impl FileDescriptor for FileHandle {
150
145
Ok ( Box :: new ( FileHandle { file : duplicated, writable : self . writable } ) )
151
146
}
152
147
153
- #[ cfg( unix) ]
154
- fn as_unix_host_fd ( & self ) -> Option < i32 > {
155
- use std:: os:: unix:: io:: AsRawFd ;
156
- Some ( self . file . as_raw_fd ( ) )
157
- }
158
-
159
148
fn is_tty ( & self , communicate_allowed : bool ) -> bool {
160
149
communicate_allowed && self . file . is_terminal ( )
161
150
}
@@ -183,11 +172,6 @@ impl FileDescriptor for io::Stdin {
183
172
Ok ( Box :: new ( io:: stdin ( ) ) )
184
173
}
185
174
186
- #[ cfg( unix) ]
187
- fn as_unix_host_fd ( & self ) -> Option < i32 > {
188
- Some ( libc:: STDIN_FILENO )
189
- }
190
-
191
175
fn is_tty ( & self , communicate_allowed : bool ) -> bool {
192
176
communicate_allowed && self . is_terminal ( )
193
177
}
@@ -220,11 +204,6 @@ impl FileDescriptor for io::Stdout {
220
204
Ok ( Box :: new ( io:: stdout ( ) ) )
221
205
}
222
206
223
- #[ cfg( unix) ]
224
- fn as_unix_host_fd ( & self ) -> Option < i32 > {
225
- Some ( libc:: STDOUT_FILENO )
226
- }
227
-
228
207
fn is_tty ( & self , communicate_allowed : bool ) -> bool {
229
208
communicate_allowed && self . is_terminal ( )
230
209
}
@@ -250,11 +229,6 @@ impl FileDescriptor for io::Stderr {
250
229
Ok ( Box :: new ( io:: stderr ( ) ) )
251
230
}
252
231
253
- #[ cfg( unix) ]
254
- fn as_unix_host_fd ( & self ) -> Option < i32 > {
255
- Some ( libc:: STDERR_FILENO )
256
- }
257
-
258
232
fn is_tty ( & self , communicate_allowed : bool ) -> bool {
259
233
communicate_allowed && self . is_terminal ( )
260
234
}
0 commit comments