File tree Expand file tree Collapse file tree 1 file changed +4
-9
lines changed Expand file tree Collapse file tree 1 file changed +4
-9
lines changed Original file line number Diff line number Diff line change @@ -64,13 +64,7 @@ pub struct State<'a> {
6464 ann : & ' a ( PpAnn +' a ) ,
6565}
6666
67- pub fn rust_printer < ' a > ( writer : Box < Write +' a > ) -> State < ' a > {
68- static NO_ANN : NoAnn = NoAnn ;
69- rust_printer_annotated ( writer, & NO_ANN )
70- }
71-
72- pub fn rust_printer_annotated < ' a > ( writer : Box < Write +' a > ,
73- ann : & ' a PpAnn ) -> State < ' a > {
67+ fn rust_printer < ' a > ( writer : Box < Write +' a > , ann : & ' a PpAnn ) -> State < ' a > {
7468 State {
7569 s : pp:: mk_printer ( writer, DEFAULT_COLUMNS ) ,
7670 cm : None ,
@@ -165,14 +159,15 @@ pub fn to_string<F>(f: F) -> String where
165159{
166160 let mut wr = Vec :: new ( ) ;
167161 {
168- let mut printer = rust_printer ( Box :: new ( & mut wr) ) ;
162+ let ann = NoAnn ;
163+ let mut printer = rust_printer ( Box :: new ( & mut wr) , & ann) ;
169164 f ( & mut printer) . unwrap ( ) ;
170165 printer. s . eof ( ) . unwrap ( ) ;
171166 }
172167 String :: from_utf8 ( wr) . unwrap ( )
173168}
174169
175- pub fn binop_to_string ( op : BinOpToken ) -> & ' static str {
170+ fn binop_to_string ( op : BinOpToken ) -> & ' static str {
176171 match op {
177172 token:: Plus => "+" ,
178173 token:: Minus => "-" ,
You can’t perform that action at this time.
0 commit comments