Skip to content

Commit 29df050

Browse files
committed
Pass by value
1 parent 7621a5b commit 29df050

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/librustdoc/docfs.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ pub struct DocFS {
3636
}
3737

3838
impl DocFS {
39-
pub fn new(errors: &Sender<String>) -> DocFS {
40-
DocFS { sync_only: false, errors: Some(errors.clone()) }
39+
pub fn new(errors: Sender<String>) -> DocFS {
40+
DocFS { sync_only: false, errors: Some(errors) }
4141
}
4242

4343
pub fn set_sync_only(&mut self, sync_only: bool) {

src/librustdoc/html/render/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,7 @@ impl FormatRenderer for Context {
462462
style_files,
463463
resource_suffix,
464464
static_root_path,
465-
fs: DocFS::new(&sender),
465+
fs: DocFS::new(sender),
466466
edition,
467467
codes: ErrorCodes::from(UnstableFeatures::from_environment().is_nightly_build()),
468468
playground,

0 commit comments

Comments
 (0)