Skip to content

Commit

Permalink
Make helper naming consistent
Browse files Browse the repository at this point in the history
  • Loading branch information
natecook1000 committed Sep 26, 2022
1 parent a2727fd commit 47188c7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Sources/ArgumentParser/Usage/DumpHelpGenerator.swift
Expand Up @@ -126,7 +126,7 @@ fileprivate extension ArgumentInfoV0 {
self.init(
kind: kind,
shouldDisplay: argument.help.visibility.base == .default,
sectionTitle: argument.help.parentTitle.nilIfEmpty,
sectionTitle: argument.help.parentTitle.nonEmpty,
isOptional: argument.help.options.contains(.isOptional),
isRepeating: argument.help.options.contains(.isRepeating),
names: argument.names.map(ArgumentInfoV0.NameInfoV0.init),
Expand Down
2 changes: 1 addition & 1 deletion Sources/ArgumentParser/Utilities/StringExtensions.swift
Expand Up @@ -239,7 +239,7 @@ extension StringProtocol where SubSequence == Substring {
return "\(lines[0])\n\(lines[1].indentingEachLine(by: n))"
}

var nilIfEmpty: Self? {
var nonEmpty: Self? {
isEmpty ? nil : self
}
}

0 comments on commit 47188c7

Please sign in to comment.