From 9e3c8438475308bffaced3d9842299676037d036 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Wed, 8 Apr 2020 12:19:41 +0200 Subject: [PATCH] fmt --- crates/ra_proc_macro_srv/src/proc_macro/diagnostic.rs | 8 +++++--- crates/ra_proc_macro_srv/src/proc_macro/mod.rs | 4 ++-- xtask/src/dist.rs | 1 - 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/crates/ra_proc_macro_srv/src/proc_macro/diagnostic.rs b/crates/ra_proc_macro_srv/src/proc_macro/diagnostic.rs index 9029f88157..55d93917c4 100644 --- a/crates/ra_proc_macro_srv/src/proc_macro/diagnostic.rs +++ b/crates/ra_proc_macro_srv/src/proc_macro/diagnostic.rs @@ -54,12 +54,14 @@ pub struct Diagnostic { } macro_rules! diagnostic_child_methods { - ($spanned:ident, $regular:ident, $level:expr) => ( + ($spanned:ident, $regular:ident, $level:expr) => { /// Adds a new child diagnostic message to `self` with the level /// identified by this method's name with the given `spans` and /// `message`. pub fn $spanned(mut self, spans: S, message: T) -> Diagnostic - where S: MultiSpan, T: Into + where + S: MultiSpan, + T: Into, { self.children.push(Diagnostic::spanned(spans, $level, message)); self @@ -71,7 +73,7 @@ macro_rules! diagnostic_child_methods { self.children.push(Diagnostic::new($level, message)); self } - ) + }; } /// Iterator over the children diagnostics of a `Diagnostic`. diff --git a/crates/ra_proc_macro_srv/src/proc_macro/mod.rs b/crates/ra_proc_macro_srv/src/proc_macro/mod.rs index e35a6ff8be..ee0dc97223 100644 --- a/crates/ra_proc_macro_srv/src/proc_macro/mod.rs +++ b/crates/ra_proc_macro_srv/src/proc_macro/mod.rs @@ -169,13 +169,13 @@ pub mod token_stream { pub struct Span(bridge::client::Span); macro_rules! diagnostic_method { - ($name:ident, $level:expr) => ( + ($name:ident, $level:expr) => { /// Creates a new `Diagnostic` with the given `message` at the span /// `self`. pub fn $name>(self, message: T) -> Diagnostic { Diagnostic::spanned(self, $level, message) } - ) + }; } impl Span { diff --git a/xtask/src/dist.rs b/xtask/src/dist.rs index 67ae6106ab..a56eeef8d2 100644 --- a/xtask/src/dist.rs +++ b/xtask/src/dist.rs @@ -7,7 +7,6 @@ use crate::{ project_root, }; - pub fn run_dist(nightly: bool, client_version: Option) -> Result<()> { let dist = project_root().join("dist"); rm_rf(&dist)?;