From bdc9291ed9dd0501a0d25a87463212ad5ec5d87a Mon Sep 17 00:00:00 2001 From: Matthias Krüger Date: Wed, 30 Dec 2020 12:59:07 +0100 Subject: where possible, pass slices instead of &Vec or &String (clippy::ptr_arg) --- src/librustdoc/html/render/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/librustdoc/html/render') diff --git a/src/librustdoc/html/render/mod.rs b/src/librustdoc/html/render/mod.rs index 6f8a4d9513b..04876c1d3f0 100644 --- a/src/librustdoc/html/render/mod.rs +++ b/src/librustdoc/html/render/mod.rs @@ -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, -- cgit 1.4.1-3-g733a5