autodoc: anonymous struct type indentation fix

This commit is contained in:
Krzysztof Wolicki Der Teufel 2023-02-10 14:31:26 +01:00
parent 02bc6356d7
commit 14bf20daeb
2 changed files with 3 additions and 3 deletions

View File

@ -1789,7 +1789,7 @@ const NAV_MODES = {
if (structObj.fields.length > 1 && opts.wantHtml) {
indent = "    "
}
if (opts.indent) {
if (opts.indent && structObj.fields.length > 1) {
indent = opts.indent + indent;
}
let structNode = getAstNode(structObj.src);
@ -1819,7 +1819,7 @@ const NAV_MODES = {
name += html;
}
if (opts.indent) {
if (opts.indent && structObj.fields.length > 1) {
name += opts.indent;
}
name += "}";

View File

@ -3628,7 +3628,7 @@ fn tryResolveRefPath(
}
if (self.pending_ref_paths.get(&path[path.len - 1])) |waiter_list| {
// It's important to de-register oureslves as pending before
// It's important to de-register ourselves as pending before
// attempting to resolve any other decl.
_ = self.pending_ref_paths.remove(&path[path.len - 1]);