File tree 1 file changed +4
-9
lines changed
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> {
64
64
ann : & ' a ( PpAnn +' a ) ,
65
65
}
66
66
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 > {
74
68
State {
75
69
s : pp:: mk_printer ( writer, DEFAULT_COLUMNS ) ,
76
70
cm : None ,
@@ -165,14 +159,15 @@ pub fn to_string<F>(f: F) -> String where
165
159
{
166
160
let mut wr = Vec :: new ( ) ;
167
161
{
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) ;
169
164
f ( & mut printer) . unwrap ( ) ;
170
165
printer. s . eof ( ) . unwrap ( ) ;
171
166
}
172
167
String :: from_utf8 ( wr) . unwrap ( )
173
168
}
174
169
175
- pub fn binop_to_string ( op : BinOpToken ) -> & ' static str {
170
+ fn binop_to_string ( op : BinOpToken ) -> & ' static str {
176
171
match op {
177
172
token:: Plus => "+" ,
178
173
token:: Minus => "-" ,
You can’t perform that action at this time.
0 commit comments