Skip to content

Commit 2ef6c46

Browse files
committed
Remove unnecessary braces
1 parent dd6307d commit 2ef6c46

File tree

1 file changed

+25
-31
lines changed
  • crates/ra_ide_api/tests/test

1 file changed

+25
-31
lines changed

crates/ra_ide_api/tests/test/main.rs

Lines changed: 25 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -97,51 +97,45 @@ fn test_find_all_refs_for_fn_param() {
9797

9898
#[test]
9999
fn test_world_symbols_with_no_container() {
100-
{
101-
let code = r#"
102-
enum FooInner { }
103-
"#;
100+
let code = r#"
101+
enum FooInner { }
102+
"#;
104103

105-
let mut symbols = get_symbols_matching(code, "FooInner");
104+
let mut symbols = get_symbols_matching(code, "FooInner");
106105

107-
let s = symbols.pop().unwrap();
106+
let s = symbols.pop().unwrap();
108107

109-
assert_eq!(s.name(), "FooInner");
110-
assert!(s.container_name().is_none());
111-
}
108+
assert_eq!(s.name(), "FooInner");
109+
assert!(s.container_name().is_none());
112110
}
113111

114112
#[test]
115113
fn test_world_symbols_include_container_name() {
116-
{
117-
let code = r#"
118-
fn foo() {
119-
enum FooInner { }
120-
}
121-
"#;
114+
let code = r#"
115+
fn foo() {
116+
enum FooInner { }
117+
}
118+
"#;
122119

123-
let mut symbols = get_symbols_matching(code, "FooInner");
120+
let mut symbols = get_symbols_matching(code, "FooInner");
124121

125-
let s = symbols.pop().unwrap();
122+
let s = symbols.pop().unwrap();
126123

127-
assert_eq!(s.name(), "FooInner");
128-
assert_eq!(s.container_name(), Some(&SmolStr::new("foo")));
129-
}
124+
assert_eq!(s.name(), "FooInner");
125+
assert_eq!(s.container_name(), Some(&SmolStr::new("foo")));
130126

131-
{
132-
let code = r#"
133-
mod foo {
134-
struct FooInner;
135-
}
136-
"#;
127+
let code = r#"
128+
mod foo {
129+
struct FooInner;
130+
}
131+
"#;
137132

138-
let mut symbols = get_symbols_matching(code, "FooInner");
133+
let mut symbols = get_symbols_matching(code, "FooInner");
139134

140-
let s = symbols.pop().unwrap();
135+
let s = symbols.pop().unwrap();
141136

142-
assert_eq!(s.name(), "FooInner");
143-
assert_eq!(s.container_name(), Some(&SmolStr::new("foo")));
144-
}
137+
assert_eq!(s.name(), "FooInner");
138+
assert_eq!(s.container_name(), Some(&SmolStr::new("foo")));
145139
}
146140

147141
#[test]

0 commit comments

Comments
 (0)