Skip to content

Commit

Permalink
Chore: prefer HashMap::from over collecting Vec of tuples
Browse files Browse the repository at this point in the history
  • Loading branch information
BastiDood committed Oct 29, 2021
1 parent 0a98b1d commit 144d941
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/bin/cargo/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ lazy_static::lazy_static! {
// Maps from commonly known external commands (not builtin to cargo) to their
// description, for the help page. Reserved for external subcommands that are
// core within the rust ecosystem (esp ones that might become internal in the future).
static ref KNOWN_EXTERNAL_COMMAND_DESCRIPTIONS: HashMap<&'static str, &'static str> = vec![
static ref KNOWN_EXTERNAL_COMMAND_DESCRIPTIONS: HashMap<&'static str, &'static str> = HashMap::from([
("clippy", "Checks a package to catch common mistakes and improve your Rust code."),
("fmt", "Formats all bin and lib files of the current crate using rustfmt."),
].into_iter().collect();
]);
}

pub fn main(config: &mut Config) -> CliResult {
Expand Down

0 comments on commit 144d941

Please sign in to comment.