Replace - with _ in crate lookup
rustdoc normalizes the name of a crate by replacing hyphens with underscores. With this patch, we also perform this normalization when looking up a crate.
This commit is contained in:
parent
fc7d2c7ee9
commit
ec6be9fbb1
@ -35,7 +35,7 @@ impl DirSource {
|
||||
|
||||
impl Source for DirSource {
|
||||
fn find_crate(&self, name: &str) -> Option<doc::Crate> {
|
||||
let crate_path = self.path.join(name);
|
||||
let crate_path = self.path.join(name.replace('-', "_"));
|
||||
if crate_path.join("all.html").is_file() {
|
||||
Some(doc::Crate::new(name.to_owned(), crate_path))
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user