@@ -66,11 +66,6 @@ pub trait FileDescriptor: std::fmt::Debug + Any {
6666    fn  is_tty ( & self ,  _communicate_allowed :  bool )  -> bool  { 
6767        false 
6868    } 
69- 
70-     #[ cfg( unix) ]  
71-     fn  as_unix_host_fd ( & self )  -> Option < i32 >  { 
72-         None 
73-     } 
7469} 
7570
7671impl  dyn  FileDescriptor  { 
@@ -150,12 +145,6 @@ impl FileDescriptor for FileHandle {
150145        Ok ( Box :: new ( FileHandle  {  file :  duplicated,  writable :  self . writable  } ) ) 
151146    } 
152147
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- 
159148    fn  is_tty ( & self ,  communicate_allowed :  bool )  -> bool  { 
160149        communicate_allowed && self . file . is_terminal ( ) 
161150    } 
@@ -183,11 +172,6 @@ impl FileDescriptor for io::Stdin {
183172        Ok ( Box :: new ( io:: stdin ( ) ) ) 
184173    } 
185174
186-     #[ cfg( unix) ]  
187-     fn  as_unix_host_fd ( & self )  -> Option < i32 >  { 
188-         Some ( libc:: STDIN_FILENO ) 
189-     } 
190- 
191175    fn  is_tty ( & self ,  communicate_allowed :  bool )  -> bool  { 
192176        communicate_allowed && self . is_terminal ( ) 
193177    } 
@@ -220,11 +204,6 @@ impl FileDescriptor for io::Stdout {
220204        Ok ( Box :: new ( io:: stdout ( ) ) ) 
221205    } 
222206
223-     #[ cfg( unix) ]  
224-     fn  as_unix_host_fd ( & self )  -> Option < i32 >  { 
225-         Some ( libc:: STDOUT_FILENO ) 
226-     } 
227- 
228207    fn  is_tty ( & self ,  communicate_allowed :  bool )  -> bool  { 
229208        communicate_allowed && self . is_terminal ( ) 
230209    } 
@@ -250,11 +229,6 @@ impl FileDescriptor for io::Stderr {
250229        Ok ( Box :: new ( io:: stderr ( ) ) ) 
251230    } 
252231
253-     #[ cfg( unix) ]  
254-     fn  as_unix_host_fd ( & self )  -> Option < i32 >  { 
255-         Some ( libc:: STDERR_FILENO ) 
256-     } 
257- 
258232    fn  is_tty ( & self ,  communicate_allowed :  bool )  -> bool  { 
259233        communicate_allowed && self . is_terminal ( ) 
260234    } 
0 commit comments