From 8f70778c26ecf7ede9bedb8175538a04ea16ba6b Mon Sep 17 00:00:00 2001
From: Awiteb
Date: Sun, 8 Jun 2025 20:31:18 +0000
Subject: [PATCH] chore: Improve `unreachable` panic message
Signed-off-by: Awiteb
---
src/cli/commands/mod.rs | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/cli/commands/mod.rs b/src/cli/commands/mod.rs
index 535e3eb..9018994 100644
--- a/src/cli/commands/mod.rs
+++ b/src/cli/commands/mod.rs
@@ -114,7 +114,11 @@ impl CliOptions {
if let Some(sk) = &self.secret_key {
return Ok(Keys::new(sk.clone()).public_key());
}
- unreachable!("There is no other method until now")
+ unreachable!(
+ "This method should only be called when a signer is required. If this panic occurs, \
+ it indicates a bug where the command failed to properly require a signer (which is \
+ the default behavior)"
+ )
}
/// Returns the signer