about summary refs log tree commit diff
path: root/src/librustdoc/html/render/mod.rs
diff options
context:
space:
mode:
authorYuki Okushi <huyuumi.dev@gmail.com>2020-12-30 22:49:26 +0900
committerGitHub <noreply@github.com>2020-12-30 22:49:26 +0900
commit41fa0dba2767d62fc1b5f66e1b3bdf7d4a1c6d2f (patch)
tree17587cb0c791e4db06ea92113f0b56846667b636 /src/librustdoc/html/render/mod.rs
parent07083739fb2b971fa174d5443ab3e675d363fa1a (diff)
parentbdc9291ed9dd0501a0d25a87463212ad5ec5d87a (diff)
downloadrust-41fa0dba2767d62fc1b5f66e1b3bdf7d4a1c6d2f.tar.gz
rust-41fa0dba2767d62fc1b5f66e1b3bdf7d4a1c6d2f.zip
Rollup merge of #80509 - matthiaskrgr:ptr_arg, r=varkor
where possible, pass slices instead of &Vec or &String (clippy::ptr_arg)
Diffstat (limited to 'src/librustdoc/html/render/mod.rs')
-rw-r--r--src/librustdoc/html/render/mod.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/librustdoc/html/render/mod.rs b/src/librustdoc/html/render/mod.rs
index 407076ed6ff..d8fadbf57e8 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,