Skip to content

[Upstream] chore(model): remove unused newChannelId2channel variable#129

Open
Sagit-chu wants to merge 1 commit into
mainfrom
upstream-pr-2391
Open

[Upstream] chore(model): remove unused newChannelId2channel variable#129
Sagit-chu wants to merge 1 commit into
mainfrom
upstream-pr-2391

Conversation

@Sagit-chu

Copy link
Copy Markdown
Owner

Synced from upstream PR: songquanpeng#2391

Summary

  • Remove the unused newChannelId2channel variable from InitChannelCache() in model/cache.go.

Why

The variable is declared at line 174, populated in the loop at line 178, but never read anywhere. It is dead code that wastes memory by building a map that is immediately discarded.

Related: songquanpeng#2321

Test plan

  • Verify go vet ./model/ passes
  • Verify channel cache sync still works correctly

🤖 Generated with Claude Code

The variable newChannelId2channel in InitChannelCache() is declared
and populated but never read. Remove the dead code.

Related: songquanpeng#2321

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant