From a652a83ffd1ba897efa87cdcdd8a5d364410b7a8 Mon Sep 17 00:00:00 2001 From: Nick Cameron Date: Tue, 21 Apr 2015 16:49:16 +1200 Subject: [PATCH] Trivial reformatting --- src/mod.rs | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/src/mod.rs b/src/mod.rs index 750b3159a932..7ea31aec7329 100644 --- a/src/mod.rs +++ b/src/mod.rs @@ -282,15 +282,6 @@ impl<'a, 'v> visit::Visitor<'v> for FmtVisitor<'a> { } } -fn make_indent(width: usize) -> String { - let mut indent = String::with_capacity(width); - for _ in 0..width { - indent.push(' ') - } - indent -} - - impl<'a> FmtVisitor<'a> { fn from_codemap<'b>(codemap: &'b CodeMap) -> FmtVisitor<'b> { FmtVisitor { @@ -603,6 +594,15 @@ fn next_char(s: &str, mut i: usize) -> usize { i } +#[inline] +fn make_indent(width: usize) -> String { + let mut indent = String::with_capacity(width); + for _ in 0..width { + indent.push(' ') + } + indent +} + struct RustFmtCalls { input_path: Option, } @@ -615,7 +615,10 @@ impl<'a> CompilerCalls<'a> for RustFmtCalls { Compilation::Continue } - fn some_input(&mut self, input: Input, input_path: Option) -> (Input, Option) { + fn some_input(&mut self, + input: Input, + input_path: Option) + -> (Input, Option) { match input_path { Some(ref ip) => self.input_path = Some(ip.clone()), _ => {