Skip to content

Commit

Permalink
improve panic message
Browse files Browse the repository at this point in the history
  • Loading branch information
abdulmth committed Aug 1, 2023
1 parent c0e9ce4 commit f65846d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions sdk/src/types/block/context_input/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ impl ContextInput {
if let Self::Commitment(input) = self {
input
} else {
panic!("context input is not of type commitment: {:?}", self);
panic!("invalid downcast of non-CommitmentContextInput");
}
}
/// Gets the input as an actual [`BlockIssuanceCreditContextInput`].
Expand All @@ -80,7 +80,7 @@ impl ContextInput {
if let Self::BlockIssuanceCredit(input) = self {
input
} else {
panic!("context input is not of type block issuance credit: {:?}", self);
panic!("invalid downcast of non-BlockIssuanceCreditContextInput");
}
}

Expand All @@ -90,7 +90,7 @@ impl ContextInput {
if let Self::Reward(input) = self {
input
} else {
panic!("context input is not of type reward: {:?}", self);
panic!("invalid downcast of non-RewardContextInput");
}
}
}
Expand Down

0 comments on commit f65846d

Please sign in to comment.