aboutsummaryrefslogtreecommitdiff
path: root/arg_picker/src/picker/result.rs
diff options
context:
space:
mode:
Diffstat (limited to 'arg_picker/src/picker/result.rs')
-rw-r--r--arg_picker/src/picker/result.rs8
1 files changed, 5 insertions, 3 deletions
diff --git a/arg_picker/src/picker/result.rs b/arg_picker/src/picker/result.rs
index 83ca2cd..2099825 100644
--- a/arg_picker/src/picker/result.rs
+++ b/arg_picker/src/picker/result.rs
@@ -21,13 +21,15 @@ internal_repeat!(1..=32 => {
internal_repeat!(1..=32 => {
impl<(T$,+), Route> PickerResult$<(T$,+), Route> {
- /// Unwraps the result, panicking if a route was selected.
+ /// Unwraps the result, panicking if a route was selected or a required
+ /// value is missing.
///
/// # Panics
///
- /// Panics if `self.route` is `Some(...)`.
+ /// Panics if `self.route` is `Some(...)`, or if a required argument was
+ /// not provided by the user.
pub fn unwrap(self) -> ((T$,+)) {
- ((self.v$.unwrap(),+))
+ ((self.v$.expect(concat!("missing required argument at position ", $)),+))
}
/// Returns the individual option values without checking the route.