mirror of
https://github.com/erg-lang/erg.git
synced 2025-10-02 21:44:34 +00:00
Merge branch 'main' into pr/320
This commit is contained in:
commit
924b22a171
91 changed files with 1836 additions and 1027 deletions
|
@ -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)?;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue