Just as an FYI: i'm making the other suggested changes but not this one.  I like having all of the writing go through an intermediate function; makes it easier to instrument the `render` function later by having one place to add code to.  Of course in this draft not *all* of the writing was going through `writeln`: namely the indenting `try!(w.write_str("    "))".  So I'll resolve that by factoring out the indent into its own helper as well.