We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
flatMap
1 parent 7506042 commit 841b853Copy full SHA for 841b853
Sources/ArgumentParser/Parsable Properties/Flag.swift
@@ -395,7 +395,7 @@ extension Flag where Value: EnumerableFlag {
395
// Create a string representation of the default value. Since this is a
396
// flag, the default value to show to the user is the `--value-name`
397
// flag that a user would provide on the command line, not a Swift value.
398
- let defaultValueFlag = initial.flatMap { value in
+ let defaultValueFlag = initial.flatMap { value -> String? in
399
let defaultKey = InputKey(rawValue: String(describing: value))
400
let defaultNames = Value.name(for: value).makeNames(defaultKey)
401
return defaultNames.first?.synopsisString
0 commit comments