fix: keep attributes on modules when using --dump

This commit is contained in:
David Kellermann 2025-04-13 22:28:27 +02:00 committed by David Kellermann
parent 1bf12cadef
commit cf34244d2b
No known key found for this signature in database

View file

@ -45,11 +45,21 @@ impl Display for Item<'_> {
write!(f, " {relative}")
}
Self::Module {
doc,
groups,
name,
relative,
optional,
..
} => {
if let Some(docstr) = doc {
writeln!(f, "# {docstr}")?;
}
for group in groups.iter() {
writeln!(f, "[group('{}')]", group)?;
}
write!(f, "mod")?;
if *optional {