diff options
| author | Caleb Cartwright <calebcartwright@users.noreply.github.com> | 2019-08-15 21:14:53 -0500 |
|---|---|---|
| committer | Seiichi Uchida <seuchida@gmail.com> | 2019-08-16 11:14:53 +0900 |
| commit | dfd27663dca6b9e0e84c04a4d7319ccf8a879909 (patch) | |
| tree | dd2146866cd634422e1ec703556dd582c4ed6598 /src/source_file.rs | |
| parent | 541d9a865989459337131f1e130e7d4732acd47f (diff) | |
add json emit mode (#3735)
Diffstat (limited to 'src/source_file.rs')
| -rw-r--r-- | src/source_file.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/source_file.rs b/src/source_file.rs index 074b7a7315f..28366ca2485 100644 --- a/src/source_file.rs +++ b/src/source_file.rs @@ -28,11 +28,11 @@ pub(crate) fn write_all_files<T>( where T: Write, { - let emitter = create_emitter(config); + let mut emitter = create_emitter(config); emitter.emit_header(out)?; for &(ref filename, ref text) in source_file { - write_file(None, filename, text, out, &*emitter)?; + write_file(None, filename, text, out, &mut *emitter)?; } emitter.emit_footer(out)?; @@ -44,7 +44,7 @@ pub(crate) fn write_file<T>( filename: &FileName, formatted_text: &str, out: &mut T, - emitter: &dyn Emitter, + emitter: &mut dyn Emitter, ) -> Result<emitter::EmitterResult, io::Error> where T: Write, |
