apple / swift-argument-parser

Straightforward, type-safe argument parsing for Swift
Apache License 2.0
3.3k stars 311 forks source link

Prefer if-let shorthand in `CountLines.swift` #638

Closed KS1019 closed 3 months ago

KS1019 commented 3 months ago

CountLines.swift uses the mix of the normal if-let and the shorthand. This PR changes the normal version to the shorthand to stay consistent.

Checklist

natecook1000 commented 3 months ago

Looks good to me, now that we're on 5.7 as the minimum Swift version. Thanks, @KS1019!

natecook1000 commented 3 months ago

@swift-ci Please test

rauhul commented 3 months ago

We can merge this, but I personally really dislike this syntax because it doesn't work with property chaining. This becomes a deal breaker for me because explicit self is a must imo.

rauhul commented 3 months ago

@swift-ci test