1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-19 18:22:59 +08:00

Shorten Where().FirstOrDefault()

This commit is contained in:
iiSaLMaN 2019-08-04 18:31:32 +03:00
parent f5daf98aa5
commit 598c02f8b9

View File

@ -78,7 +78,7 @@ namespace osu.Game.Tests.Visual.Gameplay
public bool CheckPositionByUsername(string username, int? estimatedPosition)
{
var scoreItem = ScoresContainer.Where(i => i.User.Username == username).FirstOrDefault();
var scoreItem = ScoresContainer.FirstOrDefault(i => i.User.Username == username);
return scoreItem != null && scoreItem.ScorePosition == estimatedPosition;
}