mirror of
https://github.com/erg-lang/erg.git
synced 2025-09-29 20:34:44 +00:00
impl Display for ComileErrors
This commit is contained in:
parent
666ec1c7fe
commit
d8e2ece224
3 changed files with 15 additions and 7 deletions
|
@ -1,3 +1,4 @@
|
|||
use std::fmt;
|
||||
use std::fmt::Display;
|
||||
|
||||
use erg_common::astr::AtomicStr;
|
||||
|
@ -1814,6 +1815,12 @@ impl From<CompileError> for CompileErrors {
|
|||
|
||||
impl MultiErrorDisplay<CompileError> for CompileErrors {}
|
||||
|
||||
impl fmt::Display for CompileErrors {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
self.fmt_all(f)
|
||||
}
|
||||
}
|
||||
|
||||
impl CompileErrors {
|
||||
pub fn flush(&mut self) -> Self {
|
||||
Self(self.0.drain(..).collect())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue