Skip to content

Commit 144d941

Browse files
committed
Chore: prefer HashMap::from over collecting Vec of tuples
1 parent 0a98b1d commit 144d941

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/bin/cargo/cli.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ lazy_static::lazy_static! {
1515
// Maps from commonly known external commands (not builtin to cargo) to their
1616
// description, for the help page. Reserved for external subcommands that are
1717
// core within the rust ecosystem (esp ones that might become internal in the future).
18-
static ref KNOWN_EXTERNAL_COMMAND_DESCRIPTIONS: HashMap<&'static str, &'static str> = vec![
18+
static ref KNOWN_EXTERNAL_COMMAND_DESCRIPTIONS: HashMap<&'static str, &'static str> = HashMap::from([
1919
("clippy", "Checks a package to catch common mistakes and improve your Rust code."),
2020
("fmt", "Formats all bin and lib files of the current crate using rustfmt."),
21-
].into_iter().collect();
21+
]);
2222
}
2323

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

0 commit comments

Comments
 (0)