Skip to content

Commit

Permalink
Add json backend
Browse files Browse the repository at this point in the history
  • Loading branch information
P1n3appl3 committed Aug 14, 2020
1 parent 43bec40 commit 9328cd1
Show file tree
Hide file tree
Showing 4 changed files with 1,258 additions and 14 deletions.
5 changes: 5 additions & 0 deletions src/librustdoc/clean/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1410,6 +1410,11 @@ impl Path {
pub fn last_name(&self) -> &str {
self.segments.last().expect("segments were empty").name.as_str()
}

pub fn whole_name(&self) -> String {
String::from(if self.global { "::" } else { "" })
+ &self.segments.iter().map(|s| s.name.clone()).collect::<Vec<_>>().join("::")
}
}

#[derive(Clone, PartialEq, Eq, Debug, Hash)]
Expand Down
Loading

0 comments on commit 9328cd1

Please sign in to comment.