File tree 1 file changed +4
-14
lines changed
src/alejandra_engine/src/rules
1 file changed +4
-14
lines changed Original file line number Diff line number Diff line change @@ -19,20 +19,10 @@ pub mod string;
19
19
pub mod string_interpol;
20
20
21
21
pub fn default (
22
- build_ctx : & crate :: builder:: BuildCtx ,
22
+ _ : & crate :: builder:: BuildCtx ,
23
23
node : & rnix:: SyntaxNode ,
24
24
) -> std:: collections:: LinkedList < crate :: builder:: Step > {
25
- let mut steps = std:: collections:: LinkedList :: new ( ) ;
26
-
27
- let mut children = crate :: children:: Children :: new ( build_ctx, node) ;
28
-
29
- while let Some ( child) = children. get_next ( ) {
30
- let step = match build_ctx. vertical {
31
- true => crate :: builder:: Step :: FormatWider ( child. element ) ,
32
- _ => crate :: builder:: Step :: Format ( child. element ) ,
33
- } ;
34
- steps. push_back ( step) ;
35
- }
36
-
37
- steps
25
+ node. children_with_tokens ( )
26
+ . map ( |child| crate :: builder:: Step :: Format ( child. into ( ) ) )
27
+ . collect ( )
38
28
}
You can’t perform that action at this time.
0 commit comments