From 73ed489c9ec867afbff5b2cfad54695f1b47a881 Mon Sep 17 00:00:00 2001 From: beads/crew/grip Date: Fri, 2 Jan 2026 14:08:13 -0800 Subject: [PATCH] refactor(mol): remove redundant guard in showCompoundBondingInfo MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The caller already checks IsCompound() before calling, so the internal guard was unnecessary. Added doc comment clarifying the precondition. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- cmd/bd/mol_show.go | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/cmd/bd/mol_show.go b/cmd/bd/mol_show.go index 5585121c..bc8f228a 100644 --- a/cmd/bd/mol_show.go +++ b/cmd/bd/mol_show.go @@ -104,12 +104,9 @@ func showMolecule(subgraph *MoleculeSubgraph) { fmt.Println() } -// showCompoundBondingInfo displays the bonding lineage for compound molecules +// showCompoundBondingInfo displays the bonding lineage for compound molecules. +// Caller must ensure root.IsCompound() is true. func showCompoundBondingInfo(root *types.Issue) { - if !root.IsCompound() { - return - } - constituents := root.GetConstituents() fmt.Printf("\n%s Bonded from:\n", ui.RenderAccent("🔗"))