Solitaire: Say what value was passed as wrong instruction id

Change-Id: I4b79ba95ab5a43a197dfdd164b731d37b490a093
This commit is contained in:
Stan Drozd 2021-07-29 16:25:47 +02:00 committed by Stanislaw Drozd
parent 0a669111dd
commit df5b86eded
2 changed files with 3 additions and 3 deletions

View File

@ -46,7 +46,7 @@ pub enum SolitaireError {
AlreadyInitialized(Pubkey),
/// An instruction that wasn't recognised was sent.
UnknownInstruction,
UnknownInstruction(u8),
Custom(u64),
}

View File

@ -80,8 +80,8 @@ macro_rules! solitaire {
},
)*
_ => {
Err(SolitaireError::UnknownInstruction)
other => {
Err(SolitaireError::UnknownInstruction(other))
}
}
}