Skip to content

Commit

Permalink
nit: use OfType over Select(x => x as T)
Browse files Browse the repository at this point in the history
  • Loading branch information
fifty-six committed Nov 16, 2023
1 parent 3c72552 commit 6eb9d59
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Scarab/Settings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,8 @@ or DirectoryNotFoundException

path = library_paths.Select(library_path => Path.Combine(library_path, "steamapps", "common", "Hollow Knight"))
.Select(PathUtil.ValidateWithSuffix)
.Select(x => x as ValidPath)
.FirstOrDefault(x => x is not null);
.OfType<ValidPath>()
.FirstOrDefault();

return path is not null;
}
Expand Down

0 comments on commit 6eb9d59

Please sign in to comment.