refactor(mol): remove redundant guard in showCompoundBondingInfo
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 <noreply@anthropic.com>
This commit is contained in:
committed by
Steve Yegge
parent
53790557de
commit
73ed489c9e
@@ -104,12 +104,9 @@ func showMolecule(subgraph *MoleculeSubgraph) {
|
|||||||
fmt.Println()
|
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) {
|
func showCompoundBondingInfo(root *types.Issue) {
|
||||||
if !root.IsCompound() {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
constituents := root.GetConstituents()
|
constituents := root.GetConstituents()
|
||||||
fmt.Printf("\n%s Bonded from:\n", ui.RenderAccent("🔗"))
|
fmt.Printf("\n%s Bonded from:\n", ui.RenderAccent("🔗"))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user