File tree Expand file tree Collapse file tree 1 file changed +4
-10
lines changed Expand file tree Collapse file tree 1 file changed +4
-10
lines changed Original file line number Diff line number Diff line change @@ -184,7 +184,7 @@ impl Comm {
184184 /// Send the currently held APDU
185185 // This is private. Users should call reply to set the satus word and
186186 // transmit the response.
187- fn apdu_send ( & mut self , _is_swap : bool ) {
187+ fn apdu_send ( & mut self ) {
188188 if self . tx != 0 {
189189 sys_seph:: io_tx ( self . apdu_type , & self . apdu_buffer , self . tx ) ;
190190 self . tx = 0 ;
@@ -527,17 +527,11 @@ impl Comm {
527527 self . io_buffer [ self . tx_length + 1 ] = sw as u8 ;
528528 self . tx_length += 2 ;
529529 // Transmit the response
530- self . apdu_send ( false ) ;
530+ self . apdu_send ( ) ;
531531 }
532532
533533 pub fn swap_reply < T : Into < Reply > > ( & mut self , reply : T ) {
534- let sw = reply. into ( ) . 0 ;
535- // Append status word
536- self . io_buffer [ self . tx_length ] = ( sw >> 8 ) as u8 ;
537- self . io_buffer [ self . tx_length + 1 ] = sw as u8 ;
538- self . tx_length += 2 ;
539- // Transmit the response
540- self . apdu_send ( true ) ;
534+ self . reply ( reply) ;
541535 }
542536
543537 /// Set the Status Word of the response to `StatusWords::OK` (which is equal
@@ -547,7 +541,7 @@ impl Comm {
547541 }
548542
549543 pub fn swap_reply_ok ( & mut self ) {
550- self . swap_reply ( StatusWords :: Ok ) ;
544+ self . reply_ok ( ) ;
551545 }
552546
553547 /// Return APDU Metadata
You can’t perform that action at this time.
0 commit comments