From 91745c62f82e8e7aef214edb898497f853bf9c93 Mon Sep 17 00:00:00 2001 From: Edwin Cheng Date: Thu, 2 May 2019 23:59:13 +0800 Subject: Compare text instead --- crates/ra_mbe/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'crates/ra_mbe') diff --git a/crates/ra_mbe/src/lib.rs b/crates/ra_mbe/src/lib.rs index 08bb89a6a..a2dce9c8a 100644 --- a/crates/ra_mbe/src/lib.rs +++ b/crates/ra_mbe/src/lib.rs @@ -112,8 +112,8 @@ impl PartialEq for crate::Separator { use crate::Separator::*; match (self, other) { - (Ident(ref a), Ident(ref b)) => a == b, - (Literal(ref a), Literal(ref b)) => a == b, + (Ident(ref a), Ident(ref b)) => a.text == b.text, + (Literal(ref a), Literal(ref b)) => a.text == b.text, (Puncts(ref a), Puncts(ref b)) if a.len() == b.len() => { let a_iter = a.iter().map(|a| a.char); let b_iter = b.iter().map(|b| b.char); -- cgit v1.2.3