Rename Printer constructor from mk_printer() to Printer::new()
This commit is contained in:
parent
de9b573eed
commit
953da9832d
3 changed files with 27 additions and 27 deletions
|
@ -170,7 +170,7 @@ impl<'a> State<'a> {
|
|||
ann: &'a dyn PpAnn,
|
||||
) -> State<'a> {
|
||||
State {
|
||||
s: pp::mk_printer(),
|
||||
s: pp::Printer::new(),
|
||||
comments: Some(Comments::new(sm, filename, input)),
|
||||
attrs,
|
||||
ann,
|
||||
|
@ -186,7 +186,7 @@ pub fn to_string<F>(ann: &dyn PpAnn, f: F) -> String
|
|||
where
|
||||
F: FnOnce(&mut State<'_>),
|
||||
{
|
||||
let mut printer = State { s: pp::mk_printer(), comments: None, attrs: &|_| &[], ann };
|
||||
let mut printer = State { s: pp::Printer::new(), comments: None, attrs: &|_| &[], ann };
|
||||
f(&mut printer);
|
||||
printer.s.eof()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue