mirror of
https://github.com/erg-lang/erg.git
synced 2025-09-29 12:24:45 +00:00
Update: structurally displayed
This commit is contained in:
parent
66a14e4a8c
commit
7225aac2a4
1 changed files with 4 additions and 2 deletions
|
@ -775,8 +775,10 @@ pub struct NormalSet {
|
|||
}
|
||||
|
||||
impl NestedDisplay for NormalSet {
|
||||
fn fmt_nest(&self, f: &mut fmt::Formatter<'_>, _level: usize) -> fmt::Result {
|
||||
write!(f, "{{{}}}", self.elems)
|
||||
fn fmt_nest(&self, f: &mut fmt::Formatter<'_>, level: usize) -> fmt::Result {
|
||||
writeln!(f, "{{")?;
|
||||
self.elems.fmt_nest(f, level + 1)?;
|
||||
write!(f, "{}}}", " ".repeat(level))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue