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:
parent
f5daf98aa5
commit
598c02f8b9
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user