Skip to content

Commit

Permalink
Rename strip_path to strip_path_generics
Browse files Browse the repository at this point in the history
The new name is more descriptive of what the function does.
  • Loading branch information
camelid committed Oct 3, 2021
1 parent 5f744f3 commit f9f3c9f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/librustdoc/clean/auto_trait.rs
Expand Up @@ -502,7 +502,7 @@ impl<'a, 'tcx> AutoTraitFinder<'a, 'tcx> {
.and_then(|trait_| {
ty_to_traits
.get(&ty)
.map(|bounds| bounds.contains(&strip_path(trait_.clone())))
.map(|bounds| bounds.contains(&strip_path_generics(trait_.clone())))
})
.unwrap_or(false)
{
Expand Down
3 changes: 2 additions & 1 deletion src/librustdoc/clean/utils.rs
Expand Up @@ -156,7 +156,8 @@ pub(super) fn external_path(
}
}

crate fn strip_path(path: Path) -> Path {
/// Remove the generic arguments from a path.
crate fn strip_path_generics(path: Path) -> Path {
let segments = path
.segments
.iter()
Expand Down

0 comments on commit f9f3c9f

Please sign in to comment.