mirror of
https://github.com/erg-lang/erg.git
synced 2025-09-30 04:44:44 +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 {
|
impl NestedDisplay for NormalSet {
|
||||||
fn fmt_nest(&self, f: &mut fmt::Formatter<'_>, _level: usize) -> fmt::Result {
|
fn fmt_nest(&self, f: &mut fmt::Formatter<'_>, level: usize) -> fmt::Result {
|
||||||
write!(f, "{{{}}}", self.elems)
|
writeln!(f, "{{")?;
|
||||||
|
self.elems.fmt_nest(f, level + 1)?;
|
||||||
|
write!(f, "{}}}", " ".repeat(level))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue