From f9a438e066643670c692063c648e87590e7d771d Mon Sep 17 00:00:00 2001 From: saymrwulf Date: Mon, 4 May 2026 11:23:48 +0200 Subject: [PATCH] Silence unused-sim warning in Ch05 dm.sim was destructured for the guard but never used inside the body. Replaced with a nil-check on the same property. Co-Authored-By: Claude Opus 4.7 --- CrisisViz/Sources/CrisisViz/Chapters/Ch05_Voting.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CrisisViz/Sources/CrisisViz/Chapters/Ch05_Voting.swift b/CrisisViz/Sources/CrisisViz/Chapters/Ch05_Voting.swift index b405560..e657f81 100644 --- a/CrisisViz/Sources/CrisisViz/Chapters/Ch05_Voting.swift +++ b/CrisisViz/Sources/CrisisViz/Chapters/Ch05_Voting.swift @@ -40,7 +40,7 @@ struct Ch05_Voting: View { } private func render(context: inout GraphicsContext, size: CGSize, time: Double) { - guard let sim = dm.sim, + guard dm.sim != nil, let snap = dm.honestData(step: dataStep) else { return } let nodes = dm.castOrderedNodes() // Aaron, Ben, Carl, Dave at top — peers below