Merge branch 'main' into pr/320

This commit is contained in:
Shunsuke Shibayama 2023-06-09 22:04:44 +09:00
commit 924b22a171
91 changed files with 1836 additions and 1027 deletions

View file

@ -5,7 +5,7 @@ use std::cmp::{self, Ordering};
use std::fmt;
use std::io::{stderr, BufWriter, Write as _};
use crate::config::{Input, InputKind};
use crate::io::{Input, InputKind};
use crate::style::Attribute;
use crate::style::Characters;
use crate::style::Color;
@ -985,12 +985,18 @@ macro_rules! impl_display_and_error {
}
pub trait MultiErrorDisplay<Item: ErrorDisplay>: Stream<Item> {
fn fmt_all_stderr(&self) {
fn write_all_stderr(&self) {
for err in self.iter() {
err.write_to_stderr();
}
}
fn write_all_to(&self, w: &mut impl std::io::Write) {
for err in self.iter() {
err.write_to(w);
}
}
fn fmt_all(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
for err in self.iter() {
err.format(f)?;