1
Fork 0

Pass by value

This commit is contained in:
Joseph Ryan 2020-07-29 16:48:22 -05:00
parent 7621a5b635
commit 29df0508f3
No known key found for this signature in database
GPG key ID: 1A89B54043BBCCBD
2 changed files with 3 additions and 3 deletions

View file

@ -36,8 +36,8 @@ pub struct DocFS {
} }
impl DocFS { impl DocFS {
pub fn new(errors: &Sender<String>) -> DocFS { pub fn new(errors: Sender<String>) -> DocFS {
DocFS { sync_only: false, errors: Some(errors.clone()) } DocFS { sync_only: false, errors: Some(errors) }
} }
pub fn set_sync_only(&mut self, sync_only: bool) { pub fn set_sync_only(&mut self, sync_only: bool) {

View file

@ -462,7 +462,7 @@ impl FormatRenderer for Context {
style_files, style_files,
resource_suffix, resource_suffix,
static_root_path, static_root_path,
fs: DocFS::new(&sender), fs: DocFS::new(sender),
edition, edition,
codes: ErrorCodes::from(UnstableFeatures::from_environment().is_nightly_build()), codes: ErrorCodes::from(UnstableFeatures::from_environment().is_nightly_build()),
playground, playground,