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:
Johannes Altmanninger
2026-02-10 14:44:37 +11:00
parent 96fabe4b29
commit 197779697d
2 changed files with 0 additions and 14 deletions

View File

@@ -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 {

View File

@@ -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> {