]> git.lizzy.rs Git - rust.git/commitdiff
Pass by value
authorJoseph Ryan <josephryan3.14@gmail.com>
Wed, 29 Jul 2020 21:48:22 +0000 (16:48 -0500)
committerJoseph Ryan <josephryan3.14@gmail.com>
Wed, 29 Jul 2020 21:48:22 +0000 (16:48 -0500)
src/librustdoc/docfs.rs
src/librustdoc/html/render/mod.rs

index 119059aa4a0f833cde550c965aa6c4c04bb81269..4ce6bcbe2749e0e7e4bb7a18954c0dce1ad809a6 100644 (file)
@@ -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) {
index 715b5e647649fcf85287d5c31a596cd8f2b79074..5fb2d9f6f917c929746c3f1c1a1bea65b866db82 100644 (file)
@@ -462,7 +462,7 @@ fn init(
             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,