We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8f7ab52 commit 6cbf913Copy full SHA for 6cbf913
src/bin/cargo/cli.rs
@@ -44,10 +44,9 @@ pub fn main(config: &mut Config) -> CliResult {
44
(ContextKind::InvalidSubcommand, &ContextValue::String(ref cmd)) => {
45
Some(cmd)
46
}
47
- (ContextKind::InvalidSubcommand, _) => unreachable!(),
48
_ => None,
49
})
50
- .unwrap();
+ .expect("UnrecognizedSubcommand implies the presence of InvalidSubcommand");
51
return super::execute_external_subcommand(config, &cmd, &[&cmd, "--help"])
52
.map_err(|_| e.into());
53
} else {
0 commit comments