@@ -97,51 +97,45 @@ fn test_find_all_refs_for_fn_param() {
97
97
98
98
#[ test]
99
99
fn test_world_symbols_with_no_container ( ) {
100
- {
101
- let code = r#"
102
- enum FooInner { }
103
- "# ;
100
+ let code = r#"
101
+ enum FooInner { }
102
+ "# ;
104
103
105
- let mut symbols = get_symbols_matching ( code, "FooInner" ) ;
104
+ let mut symbols = get_symbols_matching ( code, "FooInner" ) ;
106
105
107
- let s = symbols. pop ( ) . unwrap ( ) ;
106
+ let s = symbols. pop ( ) . unwrap ( ) ;
108
107
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( ) ) ;
112
110
}
113
111
114
112
#[ test]
115
113
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
+ "# ;
122
119
123
- let mut symbols = get_symbols_matching ( code, "FooInner" ) ;
120
+ let mut symbols = get_symbols_matching ( code, "FooInner" ) ;
124
121
125
- let s = symbols. pop ( ) . unwrap ( ) ;
122
+ let s = symbols. pop ( ) . unwrap ( ) ;
126
123
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" ) ) ) ;
130
126
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
+ "# ;
137
132
138
- let mut symbols = get_symbols_matching ( code, "FooInner" ) ;
133
+ let mut symbols = get_symbols_matching ( code, "FooInner" ) ;
139
134
140
- let s = symbols. pop ( ) . unwrap ( ) ;
135
+ let s = symbols. pop ( ) . unwrap ( ) ;
141
136
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" ) ) ) ;
145
139
}
146
140
147
141
#[ test]
0 commit comments