From 840edb2c4f8fe4f74999c1a311461f86fae7cbae Mon Sep 17 00:00:00 2001 From: topecongiro Date: Fri, 11 Aug 2017 17:54:38 +0900 Subject: [PATCH] Remove 'mut' notation --- src/lib.rs | 4 ++-- src/macros.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 555aa66671a..d5d2db33fc5 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -535,7 +535,7 @@ impl fmt::Display for FormatReport { // Formatting which depends on the AST. fn format_ast( krate: &ast::Crate, - mut parse_session: &mut ParseSess, + parse_session: &mut ParseSess, main_file: &Path, config: &Config, codemap: &Rc, @@ -796,7 +796,7 @@ pub enum Input { } pub fn run(input: Input, config: &Config) -> Summary { - let mut out = &mut stdout(); + let out = &mut stdout(); output_header(out, config.write_mode()).ok(); match format_input(input, config, Some(out)) { Ok((summary, _, report)) => { diff --git a/src/macros.rs b/src/macros.rs index 989aaaaa58c..ae2a16510b8 100644 --- a/src/macros.rs +++ b/src/macros.rs @@ -68,7 +68,7 @@ pub fn rewrite_macro( shape: Shape, position: MacroPosition, ) -> Option { - let mut context = &mut context.clone(); + let context = &mut context.clone(); context.inside_macro = true; if context.config.use_try_shorthand() { if let Some(expr) = convert_try_mac(mac, context) {