Skip to content

Commit

Permalink
Use OfType instead of Where != null
Browse files Browse the repository at this point in the history
  • Loading branch information
adamreeve committed Jul 7, 2024
1 parent 2656c39 commit 2bfbfa6
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/Generation/GirTool/GenerateCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,7 @@ private static DeserializedInput DeserializeInput(string platformName, string? s

var inputRepositories = input
.Select(fileName => repositoryResolver.ResolveRepository(fileName))
.Where(inputRepository => inputRepository != null)
.Select(inputRepository => inputRepository!)
.OfType<GirLoader.Input.Repository>()
.ToList();

// Get the namespaces corresponding to the input gir files.
Expand Down

0 comments on commit 2bfbfa6

Please sign in to comment.