Repository navigation
Conversation
Flatten extract_metadata_from_dom with let-else chains and move the per-child dispatch into a small helper, and rewrite find_head_node with early returns. Behavior is unchanged; the file no longer needs the nesting-too-deep baseline entry, so it is removed from alef.toml (and the generated poly.toml plus merge provenance).
CI clippy (cargo clippy -D warnings) rejects the let-else with an early return in an Option-returning function; use the ? operator instead.
Regenerated with alef 0.85.11 in a Linux container (the generated bindings themselves are unchanged; only the crate input hash in .alef-generation.toml and poly.toml's alef:hash header moved).
alef e2e generate resolves @types/node to ^26.4.0; the committed ^26.5.1 made the e2e/snippet freshness gates drift on every PR touching crates/. No generated e2e fixture content changed for this refactor.
The generator sorts devDependencies keys and pins @types/node to ^26.4.0; the committed order/pin drifted on the freshness gates.
Goldziher
added a commit
that referenced
this pull request
Sep 11, 2026
The generation fingerprint covers Rust sources plus alef.toml, both of which moved when these commits were rebased onto #482's head_metadata.rs lint paydown; that paydown also retires a nesting-too-deep per-file ignore.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
One unit of the quality-debt baseline tracked in gh-465: removes the
nesting-too-deepfinding forcrates/html-to-markdown/src/converter/head_metadata.rs.Refactor (behavior-preserving):
extract_metadata_from_dom: replaced the nestedif let/matchchain withlet-elseunwraps plus a newextract_metadata_from_childhelper that dispatches to the existing per-tag extractors. Depth drops from 6 to 2.find_head_node: early returns instead of nestedif let, andfind_mapfor the recursive descent.No arithmetic, ordering, dispatch, or output changes; the extractor contract (
extract_frontmatterbyte-equivalence with the Tier-2 path) is untouched.Baseline bookkeeping (generated files stay in sync with
alef.toml):alef.toml: removedhead_metadata.rsfrom the quality-debt baseline.poly.tomland.alef-toml-merge-provenance.toml: removed the corresponding generated entries (same change shape as the merged refactor: reduce lint debt in conversion helpers #466).Testing
poly lint .: No issues found (baseline entry removed, no new findings).poly fmt --checkon the changed file: clean.cargo fmt --checkon the changed file: clean.cargo testcould not link on this Windows host (repo's.cargo/config.tomlpinsrust-lldfor the MSVC target and no VS Build Tools are installed), so crate compilation and the full Rust test suite are verified by CI (ci-rust.yamlrunscargo testfor the workspace).