From 96236a9be542be461550083373be3d0cb0bd8406 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Tue, 8 Jan 2019 14:21:29 +0300 Subject: assist to convert if-let to match --- crates/ra_syntax/src/ast.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crates/ra_syntax/src/ast.rs') diff --git a/crates/ra_syntax/src/ast.rs b/crates/ra_syntax/src/ast.rs index 96879ae5a..d25b5642b 100644 --- a/crates/ra_syntax/src/ast.rs +++ b/crates/ra_syntax/src/ast.rs @@ -225,7 +225,7 @@ impl Whitespace { } pub fn has_newlines(&self) -> bool { - self.count_newlines_lazy().count() > 0 + self.text().contains('\n') } } -- cgit v1.2.3