@@ -118,27 +118,23 @@ mod tests {
118118
119119 #[ test]
120120 fn change_visibility_adds_pub_crate_to_items ( ) {
121- check_assist ( change_visibility, "<|>fn foo() {}" , "<|>pub(crate) fn foo() {}" ) ;
122- check_assist ( change_visibility, "f<|>n foo() {}" , "pub(crate) f<|>n foo() {}" ) ;
123- check_assist ( change_visibility, "<|>struct Foo {}" , "<|>pub(crate) struct Foo {}" ) ;
124- check_assist ( change_visibility, "<|>mod foo {}" , "<|>pub(crate) mod foo {}" ) ;
125- check_assist ( change_visibility, "<|>trait Foo {}" , "<|>pub(crate) trait Foo {}" ) ;
126- check_assist ( change_visibility, "m<|>od {}" , "pub(crate) m<|>od {}" ) ;
127- check_assist (
128- change_visibility,
129- "unsafe f<|>n foo() {}" ,
130- "pub(crate) unsafe f<|>n foo() {}" ,
131- ) ;
121+ check_assist ( change_visibility, "<|>fn foo() {}" , "pub(crate) fn foo() {}" ) ;
122+ check_assist ( change_visibility, "f<|>n foo() {}" , "pub(crate) fn foo() {}" ) ;
123+ check_assist ( change_visibility, "<|>struct Foo {}" , "pub(crate) struct Foo {}" ) ;
124+ check_assist ( change_visibility, "<|>mod foo {}" , "pub(crate) mod foo {}" ) ;
125+ check_assist ( change_visibility, "<|>trait Foo {}" , "pub(crate) trait Foo {}" ) ;
126+ check_assist ( change_visibility, "m<|>od {}" , "pub(crate) mod {}" ) ;
127+ check_assist ( change_visibility, "unsafe f<|>n foo() {}" , "pub(crate) unsafe fn foo() {}" ) ;
132128 }
133129
134130 #[ test]
135131 fn change_visibility_works_with_struct_fields ( ) {
136132 check_assist (
137133 change_visibility,
138134 r"struct S { <|>field: u32 }" ,
139- r"struct S { <|> pub(crate) field: u32 }" ,
135+ r"struct S { pub(crate) field: u32 }" ,
140136 ) ;
141- check_assist ( change_visibility, r"struct S ( <|>u32 )" , r"struct S ( <|> pub(crate) u32 )" ) ;
137+ check_assist ( change_visibility, r"struct S ( <|>u32 )" , r"struct S ( pub(crate) u32 )" ) ;
142138 }
143139
144140 #[ test]
@@ -152,17 +148,17 @@ mod tests {
152148
153149 #[ test]
154150 fn change_visibility_pub_to_pub_crate ( ) {
155- check_assist ( change_visibility, "<|>pub fn foo() {}" , "<|> pub(crate) fn foo() {}" )
151+ check_assist ( change_visibility, "<|>pub fn foo() {}" , "pub(crate) fn foo() {}" )
156152 }
157153
158154 #[ test]
159155 fn change_visibility_pub_crate_to_pub ( ) {
160- check_assist ( change_visibility, "<|>pub(crate) fn foo() {}" , "<|> pub fn foo() {}" )
156+ check_assist ( change_visibility, "<|>pub(crate) fn foo() {}" , "pub fn foo() {}" )
161157 }
162158
163159 #[ test]
164160 fn change_visibility_const ( ) {
165- check_assist ( change_visibility, "<|>const FOO = 3u8;" , "<|> pub(crate) const FOO = 3u8;" ) ;
161+ check_assist ( change_visibility, "<|>const FOO = 3u8;" , "pub(crate) const FOO = 3u8;" ) ;
166162 }
167163
168164 #[ test]
@@ -183,7 +179,7 @@ mod tests {
183179 // comments
184180
185181 #[derive(Debug)]
186- <|> pub(crate) struct Foo;
182+ pub(crate) struct Foo;
187183 " ,
188184 )
189185 }
0 commit comments