mirror of
https://github.com/trussed-dev/usbd-ctaphid.git
synced 2026-06-20 04:16:20 -07:00
Use reference to the response rather than copying it
This commit is contained in:
committed by
sosthene-nitrokey
parent
e9cbf904f5
commit
3f24df2f8b
+2
-2
@@ -573,8 +573,8 @@ impl<'alloc, 'pipe, 'interrupt, Bus: UsbBus> Pipe<'alloc, 'pipe, 'interrupt, Bus
|
||||
#[inline(never)]
|
||||
pub fn handle_response(&mut self) {
|
||||
if let State::WaitingOnAuthenticator(request) = self.state {
|
||||
if let Some(response) = self.interchange.take_response() {
|
||||
match response.0 {
|
||||
if let Ok(response) = self.interchange.response() {
|
||||
match &response.0 {
|
||||
Err(ctaphid_dispatch::app::Error::InvalidCommand) => {
|
||||
info!("Got waiting reply from authenticator??");
|
||||
self.start_sending_error(request, AuthenticatorError::InvalidCommand);
|
||||
|
||||
Reference in New Issue
Block a user