@@ -143,7 +143,7 @@ enum ReleaseMode: String, ExpressibleByArgument {
143143struct Example : ParsableCommand {
144144 @Option () var mode: ReleaseMode
145145
146- func run () throws {
146+ mutating func run () throws {
147147 print (mode)
148148 }
149149}
@@ -194,7 +194,7 @@ struct Example: ParsableCommand {
194194 @Flag (default : nil , inversion: .prefixedEnableDisable )
195195 var requiredElement: Bool
196196
197- func run () throws {
197+ mutating func run () throws {
198198 print (index, requiredElement)
199199 }
200200}
@@ -230,7 +230,7 @@ struct Example: ParsableCommand {
230230
231231 @Flag () var colors: [Color]
232232
233- func run () throws {
233+ mutating func run () throws {
234234 print (cacheMethod)
235235 print (colors)
236236 }
@@ -254,7 +254,7 @@ struct Example: ParsableCommand {
254254 @Flag (name: .shortAndLong )
255255 var verbose: Int
256256
257- func run () throws {
257+ mutating func run () throws {
258258 print (" Verbosity level: \( verbose ) " )
259259 }
260260}
@@ -281,7 +281,7 @@ struct Example: ParsableCommand {
281281 @Option () var name: String
282282 @Argument () var file: String ?
283283
284- func run () throws {
284+ mutating func run () throws {
285285 print (" Verbose: \( verbose ) , name: \( name ) , file: \( file ?? " none" ) " )
286286 }
287287}
@@ -327,7 +327,7 @@ struct Example: ParsableCommand {
327327 @Option () var file: [String ]
328328 @Flag () var verbose: Bool
329329
330- func run () throws {
330+ mutating func run () throws {
331331 print (" Verbose: \( verbose ) , files: \( file ) " )
332332 }
333333}
@@ -378,7 +378,7 @@ struct Example: ParsableCommand {
378378 @Flag () var verbose: Bool
379379 @Argument () var files: [String ]
380380
381- func run () throws {
381+ mutating func run () throws {
382382 print (" Verbose: \( verbose ) , files: \( files ) " )
383383 }
384384}
0 commit comments