From ff1b2da50280ef40988ce79f8bb5e82aff7e68c5 Mon Sep 17 00:00:00 2001 From: "Jeremy A. Kolb" Date: Sat, 6 Oct 2018 13:41:33 -0400 Subject: [PATCH] Remove functional noop --- crates/ra_editor/src/scope/fn_scope.rs | 8 -------- 1 file changed, 8 deletions(-) diff --git a/crates/ra_editor/src/scope/fn_scope.rs b/crates/ra_editor/src/scope/fn_scope.rs index 67eb8e2abd..a99bd18226 100644 --- a/crates/ra_editor/src/scope/fn_scope.rs +++ b/crates/ra_editor/src/scope/fn_scope.rs @@ -350,14 +350,6 @@ mod tests { fn do_check_local_name(code: &str, expected_offset: u32) { let (off, code) = extract_offset(code); - let code = { - let mut buf = String::new(); - let off = u32::from(off) as usize; - buf.push_str(&code[..off]); - buf.push_str(&code[off..]); - buf - }; - let file = File::parse(&code); let fn_def: ast::FnDef = find_node_at_offset(file.syntax(), off).unwrap(); let name_ref: ast::NameRef = find_node_at_offset(file.syntax(), off).unwrap();