Skip to content

Instantly share code, notes, and snippets.

@rossabaker
Created November 11, 2010 05:46
Show Gist options
  • Save rossabaker/672075 to your computer and use it in GitHub Desktop.
Save rossabaker/672075 to your computer and use it in GitHub Desktop.
implicit def writesToWriterToCharRenderable(writesToWriter: { def writeTo(writer: Writer): Unit }) =
new CharRenderable {
def writeTo(out: OutputStream, cs: Charset) { writeTo(new OutputStreamWriter(out, cs)) }
def writeTo(writer: Writer) { writesToWriter.writeTo(writer) }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment