fn parse_filename_mode(reader: &mut Cursor<&[u8]>) -> (String,String) {
         let mut buffer: Vec<u8> = Vec::new();
         reader.read_until(0, &mut buffer).unwrap();
         // Remove delimiter (\0)
         buffer.pop();
         // Todo Manage Error
         let filename = String::from_utf8(buffer).unwrap();
         // First buffer was moved above, create buffer for Mode
         let mut _mode_buf: Vec<u8> = Vec::new();
         reader.read_until(0, &mut _mode_buf).unwrap();
         _mode_buf.pop();
         let mode = String::from_utf8(_mode_buf).unwrap();
   
         return (filename, mode);
      }
// Inner function for RRQ/WRQ shared parsing logic 
Inner function for RRQ/WRQ shared parsing logic
Inner function for RRQ / WRQ shared parsing logic
fn parse_filename_mode(reader: &mut Cursor<&[u8]>) -> (String,String) {
         let mut buffer: Vec<u8> = Vec::new();
         reader.read_until(0, &mut buffer).unwrap();
         // Remove delimiter (\0)
         buffer.pop();
         // Todo Manage Error
         let filename = String::from_utf8(buffer).unwrap();
         // First buffer was moved above, create buffer for Mode
         let mut _mode_buf: Vec<u8> = Vec::new();
         reader.read_until(0, &mut _mode_buf).unwrap();
         _mode_buf.pop();
         let mode = String::from_utf8(_mode_buf).unwrap();
         return (filename, mode);
      }
fn parse_filename_mode ( reader : & mut Cursor < & [ u8 ] > ) -> ( String , String ) { let mut buffer : Vec < u8 > = Vec :: new ( ) ; reader . read_until ( 0 , & mut buffer ) . unwrap ( ) ; // Remove delimiter (\0) buffer . pop ( ) ; // Todo Manage Error let filename = String :: from_utf8 ( buffer ) . unwrap ( ) ; // First buffer was moved above, create buffer for Mode let mut _mode_buf : Vec < u8 > = Vec :: new ( ) ; reader . read_until ( 0 , & mut _mode_buf ) . unwrap ( ) ; _mode_buf . pop ( ) ; let mode = String :: from_utf8 ( _mode_buf ) . unwrap ( ) ; return ( filename , mode ) ; }
Inner function for RRQ/WRQ shared parsing logic
Inner function for RRQ / WRQ shared parsing logic
reader
&mut Cursor<&[u8]>
reader
&mut Cursor<&[u8]>