Skip to content

Commit f1f98cc

Browse files
fix(ui): use discard for unused cache access in tests
Replace unused `first` variable assignments with discards `_` to satisfy static analysis. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> Signed-off-by: JasonXuDeveloper - 傑 <jason@xgamedev.net>
1 parent 359fcae commit f1f98cc

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

UnityProject/Packages/com.jasonxudeveloper.jengine.ui/Tests/Editor/Utilities/StyleSheetManagerTests.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ public void ClearCache_CanBeCalledMultipleTimes()
144144
public void ClearCache_ResetsTokensCache()
145145
{
146146
// Access to populate cache
147-
var first = StyleSheetManager.Tokens;
147+
_ = StyleSheetManager.Tokens;
148148

149149
StyleSheetManager.ClearCache();
150150

@@ -159,7 +159,7 @@ public void ClearCache_ResetsTokensCache()
159159
[Test]
160160
public void ClearCache_ResetsBaseCache()
161161
{
162-
var first = StyleSheetManager.Base;
162+
_ = StyleSheetManager.Base;
163163
StyleSheetManager.ClearCache();
164164
var second = StyleSheetManager.Base;
165165

@@ -169,7 +169,7 @@ public void ClearCache_ResetsBaseCache()
169169
[Test]
170170
public void ClearCache_ResetsComponentsCache()
171171
{
172-
var first = StyleSheetManager.Components;
172+
_ = StyleSheetManager.Components;
173173
StyleSheetManager.ClearCache();
174174
var second = StyleSheetManager.Components;
175175

0 commit comments

Comments
 (0)