From 864fb063a000a38ce28c8c1d0153dc080faf1cdb Mon Sep 17 00:00:00 2001 From: Luciano Bestia Date: Thu, 18 Feb 2021 16:51:21 +0100 Subject: [PATCH] rustfmt 1.4.30-stable --- crates/parser/src/grammar/params.rs | 11 ++++++----- crates/rust-analyzer/src/to_proto.rs | 3 ++- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/crates/parser/src/grammar/params.rs b/crates/parser/src/grammar/params.rs index 6a98d736862..e313f6fb7f1 100644 --- a/crates/parser/src/grammar/params.rs +++ b/crates/parser/src/grammar/params.rs @@ -169,11 +169,12 @@ fn opt_self_param(p: &mut Parser, m: Marker) { let la1 = p.nth(1); let la2 = p.nth(2); let la3 = p.nth(3); - if !matches!((p.current(), la1, la2, la3), - (T![&], T![self], _, _) - | (T![&], T![mut], T![self], _) - | (T![&], LIFETIME_IDENT, T![self], _) - | (T![&], LIFETIME_IDENT, T![mut], T![self]) + if !matches!( + (p.current(), la1, la2, la3), + (T![&], T![self], _, _) + | (T![&], T![mut], T![self], _) + | (T![&], LIFETIME_IDENT, T![self], _) + | (T![&], LIFETIME_IDENT, T![mut], T![self]) ) { return m.abandon(p); } diff --git a/crates/rust-analyzer/src/to_proto.rs b/crates/rust-analyzer/src/to_proto.rs index c903ab523ca..2526f4591d8 100644 --- a/crates/rust-analyzer/src/to_proto.rs +++ b/crates/rust-analyzer/src/to_proto.rs @@ -516,7 +516,8 @@ pub(crate) fn url_from_abs_path(path: &Path) -> lsp_types::Url { assert!(path.is_absolute()); let url = lsp_types::Url::from_file_path(path).unwrap(); match path.components().next() { - Some(path::Component::Prefix(prefix)) if matches!(prefix.kind(), path::Prefix::Disk(_) | path::Prefix::VerbatimDisk(_)) => + Some(path::Component::Prefix(prefix)) + if matches!(prefix.kind(), path::Prefix::Disk(_) | path::Prefix::VerbatimDisk(_)) => { // Need to lowercase driver letter } -- 2.44.0