Rollup merge of #80509 - matthiaskrgr:ptr_arg, r=varkor

where possible, pass slices instead of &Vec or &String (clippy::ptr_arg)
This commit is contained in:
Yuki Okushi
2020-12-30 22:49:26 +09:00
committed by GitHub
13 changed files with 21 additions and 27 deletions

View File

@@ -3483,7 +3483,7 @@ enum AssocItemLink<'a> {
}
impl<'a> AssocItemLink<'a> {
fn anchor(&self, id: &'a String) -> Self {
fn anchor(&self, id: &'a str) -> Self {
match *self {
AssocItemLink::Anchor(_) => AssocItemLink::Anchor(Some(&id)),
ref other => *other,