@@ -155,7 +155,6 @@ impl<W: Write> StreamSession<W> {
155155pub struct PtySession {
156156 pub process : PtyProcess ,
157157 pub stream : StreamSession < File > ,
158- pub commandname : String , // only for debugging purposes now
159158}
160159
161160// make StreamSession's methods available directly
@@ -192,19 +191,11 @@ impl DerefMut for PtySession {
192191/// # }
193192/// ```
194193impl PtySession {
195- fn new (
196- process : PtyProcess ,
197- timeout_ms : Option < u64 > ,
198- commandname : String ,
199- ) -> Result < Self , Error > {
194+ fn new ( process : PtyProcess , timeout_ms : Option < u64 > ) -> Result < Self , Error > {
200195 let f = process. get_file_handle ( ) ;
201196 let reader = f. try_clone ( ) ?;
202197 let stream = StreamSession :: new ( reader, f, timeout_ms) ;
203- Ok ( Self {
204- process,
205- stream,
206- commandname,
207- } )
198+ Ok ( Self { process, stream } )
208199 }
209200}
210201
@@ -241,11 +232,10 @@ pub fn spawn(program: &str, timeout_ms: Option<u64>) -> Result<PtySession, Error
241232
242233/// See `spawn`
243234pub fn spawn_command ( command : Command , timeout_ms : Option < u64 > ) -> Result < PtySession , Error > {
244- let commandname = format ! ( "{:?}" , & command) ;
245235 let mut process = PtyProcess :: new ( command) ?;
246236 process. set_kill_timeout ( timeout_ms) ;
247237
248- PtySession :: new ( process, timeout_ms, commandname )
238+ PtySession :: new ( process, timeout_ms)
249239}
250240
251241/// A repl session: e.g. bash or the python shell:
0 commit comments