From de85f1e94740d9a19066f7fda2e57d26973e472c Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Fri, 1 Feb 2019 10:52:36 +0300 Subject: remove hard-coded support for ctry macro It was used mainly to prevent HirFileId infra from bitroting, but the `vec![]` macro can serve that just as well! --- crates/ra_ide_api/src/extend_selection.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'crates/ra_ide_api/src/extend_selection.rs') diff --git a/crates/ra_ide_api/src/extend_selection.rs b/crates/ra_ide_api/src/extend_selection.rs index cd2ebe471..f61feaf1b 100644 --- a/crates/ra_ide_api/src/extend_selection.rs +++ b/crates/ra_ide_api/src/extend_selection.rs @@ -47,11 +47,11 @@ mod tests { let (analysis, frange) = single_file_with_range( " fn main() { - ctry!(foo(|x| <|>x<|>)); + vec![foo(|x| <|>x<|>)]; } ", ); let r = analysis.extend_selection(frange).unwrap(); - assert_eq!(r, TextRange::from_to(51.into(), 56.into())); + assert_eq!(r, TextRange::from_to(50.into(), 55.into())); } } -- cgit v1.2.3