Skip to content

Commit

Permalink
Pass by value
Browse files Browse the repository at this point in the history
  • Loading branch information
P1n3appl3 committed Jul 29, 2020
1 parent 7621a5b commit 29df050
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/librustdoc/docfs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion src/librustdoc/html/render/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 29df050

Please sign in to comment.