aboutsummaryrefslogtreecommitdiff
path: root/src/hir/print.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/hir/print.rs')
-rw-r--r--src/hir/print.rs9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/hir/print.rs b/src/hir/print.rs
index ff18c6e..b71f389 100644
--- a/src/hir/print.rs
+++ b/src/hir/print.rs
@@ -65,17 +65,16 @@ impl Printer {
/// here are a `fmt::Formatter` (which is available in `fmt::Display`
/// implementations) or a `&mut String`.
pub fn print<W: fmt::Write>(&mut self, hir: &Hir, wtr: W) -> fmt::Result {
- visitor::visit(hir, Writer { printer: self, wtr: wtr })
+ visitor::visit(hir, Writer { wtr })
}
}
#[derive(Debug)]
-struct Writer<'p, W> {
- printer: &'p mut Printer,
+struct Writer<W> {
wtr: W,
}
-impl<'p, W: fmt::Write> Visitor for Writer<'p, W> {
+impl<W: fmt::Write> Visitor for Writer<W> {
type Output = ();
type Err = fmt::Error;
@@ -209,7 +208,7 @@ impl<'p, W: fmt::Write> Visitor for Writer<'p, W> {
}
}
-impl<'p, W: fmt::Write> Writer<'p, W> {
+impl<W: fmt::Write> Writer<W> {
fn write_literal_char(&mut self, c: char) -> fmt::Result {
if is_meta_character(c) {
self.wtr.write_str("\\")?;