Conversation
|
(rust-highfive has picked a reviewer for you, use r? to override) |
crates/mdman/src/hbs.rs
Outdated
| .expect("utf8 filename") | ||
| .to_string(); | ||
| data.insert("man_name".to_string(), man_name); | ||
| let data: HashMap<String, String> = [("man_name", man_name)].into(); |
There was a problem hiding this comment.
Could this perhaps be HashMap::from([...]) to avoid the need to have type ascription?
There was a problem hiding this comment.
I will switch (them all) to that in the morning. It is much clearer.
| // `registry.default` is handled in command-line parsing. | ||
| let (index, token, process) = match registry { | ||
| Some(registry) => { | ||
| validate_package_name(registry, "registry name", "")?; |
There was a problem hiding this comment.
Was this intentional to be removed? (in isolation I don't know what this is doing and it may no longer be necessary but otherwise it seems out of place for a cleanup-style commit)
There was a problem hiding this comment.
Yes, I tryed to call it out in the PR:
The only thing nontrivial was noticing that get_registry_index already calls validate_package_name.
So the next line calls this function.
|
@bors: r+ |
|
📌 Commit 6459ce0 has been approved by |
|
☀️ Test successful - checks-actions |
11 changes in d6cdde584a1f15ea086bae922e20fd27f7165431..3d6970d50e30e797b8e26b2b9b1bdf92dc381f34 2022-02-22 19:55:51 +0000 to 2022-02-28 19:29:07 +0000: - rust-lang/cargo#10395 - rust-lang/cargo#10425 - rust-lang/cargo#10428 - rust-lang/cargo#10388 - rust-lang/cargo#10167 - rust-lang/cargo#10429 - rust-lang/cargo#10426 - rust-lang/cargo#10372 - rust-lang/cargo#10420 - rust-lang/cargo#10416 - rust-lang/cargo#10417
Update cargo 11 changes in d6cdde584a1f15ea086bae922e20fd27f7165431..3d6970d50e30e797b8e26b2b9b1bdf92dc381f34 2022-02-22 19:55:51 +0000 to 2022-02-28 19:29:07 +0000: - rust-lang/cargo#10395 - rust-lang/cargo#10425 - rust-lang/cargo#10428 - rust-lang/cargo#10388 - rust-lang/cargo#10167 - rust-lang/cargo#10429 - rust-lang/cargo#10426 - rust-lang/cargo#10372 - rust-lang/cargo#10420 - rust-lang/cargo#10416 - rust-lang/cargo#10417
Just some small changes I noticed while exploring the code base.
The only thing nontrivial was noticing that get_registry_index already calls validate_package_name.