GraphQLSwift / GraphQL

The Swift GraphQL implementation for macOS and Linux
MIT License
938 stars 72 forks source link

Fixes compiler warnings #140

Closed NeedleInAJayStack closed 7 months ago

NeedleInAJayStack commented 7 months ago

Minor tweaks to fix compiler warnings

NeedleInAJayStack commented 7 months ago

What was the message regarding forEach? I'm curious, haha.

These lines failed the preferForLoop rule :

/repo/Tests/GraphQLTests/FieldExecutionStrategyTests/FieldExecutionStrategyTests.swift:262:1: error: (preferForLoop) Convert functional forEach calls to for loops.
/repo/Tests/GraphQLTests/FieldExecutionStrategyTests/FieldExecutionStrategyTests.swift:311:1: error: (preferForLoop) Convert functional forEach calls to for loops.

It looks like this was enabled by default in SwiftFormat a few months ago: https://github.com/nicklockwood/SwiftFormat/commit/9c8eb475be1b2468a58a1cf9a42867d865b04a68