mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-01 04:41:14 -03:00
Remove unused Output implementations
I think the OutputStream was used only in old fish_indent code. The BufferedOutputter seems obsolete, maybe because DerefMut covers this.
This commit is contained in:
@@ -11,7 +11,6 @@
|
||||
use crate::proc::JobGroupRef;
|
||||
use crate::redirection::{RedirectionMode, RedirectionSpecList};
|
||||
use crate::signal::SigChecker;
|
||||
use crate::terminal::Output;
|
||||
use crate::topic_monitor::Topic;
|
||||
use crate::wutil::{perror, perror_io, unescape_bytes_and_write_to_fd, wdirname, wstat};
|
||||
use errno::Errno;
|
||||
@@ -732,13 +731,6 @@ pub fn append_narrow_buffer(&mut self, buffer: &SeparatedBuffer) -> bool {
|
||||
}
|
||||
}
|
||||
|
||||
impl Output for OutputStream {
|
||||
fn write_bytes(&mut self, command_part: &[u8]) {
|
||||
// TODO Retry on interrupt.
|
||||
self.append(&bytes2wcstring(command_part));
|
||||
}
|
||||
}
|
||||
|
||||
/// An output stream for builtins which outputs to an fd.
|
||||
/// Note the fd may be something like stdout; there is no ownership implied here.
|
||||
pub struct FdOutputStream {
|
||||
|
||||
@@ -755,12 +755,6 @@ fn deref_mut(&mut self) -> &mut Self::Target {
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> Output for BufferedOutputter<'a> {
|
||||
fn write_bytes(&mut self, buf: &[u8]) {
|
||||
self.0.write_bytes(buf);
|
||||
}
|
||||
}
|
||||
|
||||
/// Given a list of RgbColor, pick the "best" one, as determined by the color support. Returns
|
||||
/// RgbColor::NONE if empty.
|
||||
pub fn best_color(candidates: impl Iterator<Item = Color>, support: ColorSupport) -> Option<Color> {
|
||||
|
||||
Reference in New Issue
Block a user