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 e77b254 commit dc0bc58Copy full SHA for dc0bc58
src/bin/cargo/commands/help.rs
@@ -94,11 +94,8 @@ fn check_alias(config: &Config, subcommand: &str) -> Option<Vec<String>> {
94
/// Checks if the given subcommand is a built-in command (not via an alias).
95
///
96
/// Returns None if it is not a built-in command.
97
-fn check_builtin(subcommand: &str) -> Option<String> {
98
- match super::builtin_exec(subcommand) {
99
- Some(_) => Some(subcommand.to_string()),
100
- None => None,
101
- }
+fn check_builtin(subcommand: &str) -> Option<&str> {
+ super::builtin_exec(subcommand).map(|_| subcommand)
102
}
103
104
/// Extracts the given man page from the compressed archive.
0 commit comments