fixup minor bugs

This commit is contained in:
Nick Cameron 2018-11-19 14:09:29 +13:00
parent 3d01fc186a
commit b9f4624ca6
2 changed files with 2 additions and 2 deletions

View File

@ -447,7 +447,7 @@ pub trait CliOptions {
} }
/// The edition of the compiler (RFC 2052) /// The edition of the compiler (RFC 2052)
configuration_option_enum!{ Edition: configuration_option_enum! { Edition:
Edition2015: 2015, Edition2015: 2015,
Edition2018: 2018, Edition2018: 2018,
} }

View File

@ -421,7 +421,7 @@ pub fn rewrite_macro_inner(
// anything in between the braces (for now). // anything in between the braces (for now).
let snippet = context.snippet(mac.span); let snippet = context.snippet(mac.span);
let macro_raw = snippet.split_at(snippet.find('!')? + 1).1.trim_start(); let macro_raw = snippet.split_at(snippet.find('!')? + 1).1.trim_start();
match trim_left_preserve_layout(macro_raw, &shape.indent, &context.config) { match trim_left_preserve_layout(macro_raw, shape.indent, &context.config) {
Some(macro_body) => Some(format!("{} {}", macro_name, macro_body)), Some(macro_body) => Some(format!("{} {}", macro_name, macro_body)),
None => Some(format!("{} {}", macro_name, macro_raw)), None => Some(format!("{} {}", macro_name, macro_raw)),
} }