ok/jj
1
0
Fork 0
forked from mirrors/jj

cli: remove unused Formatter::write_from_reader()

It's unused, and we can use std::io::copy() instead.
This commit is contained in:
Yuya Nishihara 2023-01-12 15:06:43 +09:00
parent c0fc9a464a
commit dfe861a5e7

View file

@ -14,7 +14,7 @@
use std::collections::HashMap;
use std::io;
use std::io::{Error, Read, Write};
use std::io::{Error, Write};
use std::sync::Arc;
// Lets the caller label strings and translates the labels to colors
@ -27,12 +27,6 @@ pub trait Formatter: Write {
self.write_all(text.as_bytes())
}
fn write_from_reader(&mut self, reader: &mut dyn Read) -> io::Result<()> {
let mut buffer = vec![];
reader.read_to_end(&mut buffer).unwrap();
self.write_all(&buffer)
}
fn add_label(&mut self, label: &str) -> io::Result<()>;
fn remove_label(&mut self) -> io::Result<()>;