Update: structurally displayed

This commit is contained in:
GreasySlug 2022-10-05 09:10:54 +09:00
parent 66a14e4a8c
commit 7225aac2a4

View file

@ -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))
}
}