about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJoseph Ryan <josephryan3.14@gmail.com>2020-07-29 16:48:22 -0500
committerJoseph Ryan <josephryan3.14@gmail.com>2020-07-29 16:48:22 -0500
commit29df0508f3106d152ad2cd1b41cf627b98ea9d6f (patch)
treecf8aad65c1fbf91f94d4b5d3efc3d516c20bf991
parent7621a5b635542c58b6576dd1ae8396df6d8d1bf0 (diff)
downloadrust-29df0508f3106d152ad2cd1b41cf627b98ea9d6f.tar.gz
rust-29df0508f3106d152ad2cd1b41cf627b98ea9d6f.zip
Pass by value
-rw-r--r--src/librustdoc/docfs.rs4
-rw-r--r--src/librustdoc/html/render/mod.rs2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/librustdoc/docfs.rs b/src/librustdoc/docfs.rs
index 119059aa4a0..4ce6bcbe274 100644
--- a/src/librustdoc/docfs.rs
+++ b/src/librustdoc/docfs.rs
@@ -36,8 +36,8 @@ pub struct DocFS {
 }
 
 impl DocFS {
-    pub fn new(errors: &Sender<String>) -> DocFS {
-        DocFS { sync_only: false, errors: Some(errors.clone()) }
+    pub fn new(errors: Sender<String>) -> DocFS {
+        DocFS { sync_only: false, errors: Some(errors) }
     }
 
     pub fn set_sync_only(&mut self, sync_only: bool) {
diff --git a/src/librustdoc/html/render/mod.rs b/src/librustdoc/html/render/mod.rs
index 715b5e64764..5fb2d9f6f91 100644
--- a/src/librustdoc/html/render/mod.rs
+++ b/src/librustdoc/html/render/mod.rs
@@ -462,7 +462,7 @@ impl FormatRenderer for Context {
             style_files,
             resource_suffix,
             static_root_path,
-            fs: DocFS::new(&sender),
+            fs: DocFS::new(sender),
             edition,
             codes: ErrorCodes::from(UnstableFeatures::from_environment().is_nightly_build()),
             playground,