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:
parent
c0fc9a464a
commit
dfe861a5e7
1 changed files with 1 additions and 7 deletions
|
@ -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<()>;
|
||||
|
|
Loading…
Reference in a new issue