1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-15 10:22:56 +08:00

Use linq Single instead of First for guaranteed singular match

This commit is contained in:
Dean Herbert 2023-01-17 14:52:45 +09:00
parent 9b5d6b391b
commit 34120b6131

View File

@ -76,7 +76,7 @@ namespace osu.Game.Rulesets.Osu.UI
protected override void OnTouchUp(TouchUpEvent e)
{
var tracked = trackedTouches.First(t => t.Source == e.Touch.Source);
var tracked = trackedTouches.Single(t => t.Source == e.Touch.Source);
if (tracked.Action is OsuAction action)
osuInputManager.KeyBindingContainer.TriggerReleased(action);