From 2ef6c469ef15fd951a2a18ac6c0767f1a3024ae5 Mon Sep 17 00:00:00 2001 From: Ville Penttinen Date: Wed, 13 Feb 2019 11:08:25 +0200 Subject: Remove unnecessary braces --- crates/ra_ide_api/tests/test/main.rs | 56 ++++++++++++++++-------------------- 1 file changed, 25 insertions(+), 31 deletions(-) diff --git a/crates/ra_ide_api/tests/test/main.rs b/crates/ra_ide_api/tests/test/main.rs index 4126bd160..4cf842452 100644 --- a/crates/ra_ide_api/tests/test/main.rs +++ b/crates/ra_ide_api/tests/test/main.rs @@ -97,51 +97,45 @@ fn test_find_all_refs_for_fn_param() { #[test] fn test_world_symbols_with_no_container() { - { - let code = r#" - enum FooInner { } - "#; + let code = r#" + enum FooInner { } + "#; - let mut symbols = get_symbols_matching(code, "FooInner"); + let mut symbols = get_symbols_matching(code, "FooInner"); - let s = symbols.pop().unwrap(); + let s = symbols.pop().unwrap(); - assert_eq!(s.name(), "FooInner"); - assert!(s.container_name().is_none()); - } + assert_eq!(s.name(), "FooInner"); + assert!(s.container_name().is_none()); } #[test] fn test_world_symbols_include_container_name() { - { - let code = r#" - fn foo() { - enum FooInner { } - } - "#; + let code = r#" +fn foo() { + enum FooInner { } +} + "#; - let mut symbols = get_symbols_matching(code, "FooInner"); + let mut symbols = get_symbols_matching(code, "FooInner"); - let s = symbols.pop().unwrap(); + let s = symbols.pop().unwrap(); - assert_eq!(s.name(), "FooInner"); - assert_eq!(s.container_name(), Some(&SmolStr::new("foo"))); - } + assert_eq!(s.name(), "FooInner"); + assert_eq!(s.container_name(), Some(&SmolStr::new("foo"))); - { - let code = r#" - mod foo { - struct FooInner; - } - "#; + let code = r#" +mod foo { + struct FooInner; +} + "#; - let mut symbols = get_symbols_matching(code, "FooInner"); + let mut symbols = get_symbols_matching(code, "FooInner"); - let s = symbols.pop().unwrap(); + let s = symbols.pop().unwrap(); - assert_eq!(s.name(), "FooInner"); - assert_eq!(s.container_name(), Some(&SmolStr::new("foo"))); - } + assert_eq!(s.name(), "FooInner"); + assert_eq!(s.container_name(), Some(&SmolStr::new("foo"))); } #[test] -- cgit v1.2.3