@@ -71,7 +71,8 @@ struct GeneratorCLI: AsyncParsableCommand {
71
71
72
72
logger. info (
73
73
" Generator run finished successfully. " ,
74
- metadata: [ " elapsedTime " : . string( elapsed. intervalString) ] )
74
+ metadata: [ " elapsedTime " : . string( elapsed. intervalString) ]
75
+ )
75
76
}
76
77
}
77
78
@@ -167,7 +168,8 @@ extension GeneratorCLI {
167
168
if let arch = hostArch {
168
169
let target = Triple ( arch: arch, vendor: current. vendor!, os: current. os!)
169
170
appLogger. warning (
170
- " deprecated: Please use `--host \( target. triple) ` instead of `--host-arch \( arch) ` " )
171
+ " deprecated: Please use `--host \( target. triple) ` instead of `--host-arch \( arch) ` "
172
+ )
171
173
return target
172
174
}
173
175
return current
@@ -219,7 +221,8 @@ extension GeneratorCLI {
219
221
if let arch = generatorOptions. targetArch {
220
222
let target = Triple ( arch: arch, vendor: nil , os: . linux, environment: . gnu)
221
223
appLogger. warning (
222
- " deprecated: Please use `--target \( target. triple) ` instead of `--target-arch \( arch) ` " )
224
+ " deprecated: Please use `--target \( target. triple) ` instead of `--target-arch \( arch) ` "
225
+ )
223
226
}
224
227
return Triple ( arch: hostTriple. arch!, vendor: nil , os: . linux, environment: . gnu)
225
228
}
@@ -240,7 +243,9 @@ extension GeneratorCLI {
240
243
let linuxDistributionVersion =
241
244
self . linuxDistributionVersion ?? linuxDistributionDefaultVersion
242
245
let linuxDistribution = try LinuxDistribution (
243
- name: linuxDistributionName, version: linuxDistributionVersion)
246
+ name: linuxDistributionName,
247
+ version: linuxDistributionVersion
248
+ )
244
249
let hostTriple = try self . generatorOptions. deriveHostTriple ( )
245
250
let targetTriple = self . deriveTargetTriple ( hostTriple: hostTriple)
246
251
@@ -259,7 +264,10 @@ extension GeneratorCLI {
259
264
logger: loggerWithLevel ( from: self . generatorOptions)
260
265
)
261
266
try await GeneratorCLI . run (
262
- recipe: recipe, targetTriple: targetTriple, options: self . generatorOptions)
267
+ recipe: recipe,
268
+ targetTriple: targetTriple,
269
+ options: self . generatorOptions
270
+ )
263
271
}
264
272
265
273
func isInvokedAsDefaultSubcommand( ) -> Bool {
@@ -316,7 +324,10 @@ extension GeneratorCLI {
316
324
)
317
325
let targetTriple = self . deriveTargetTriple ( )
318
326
try await GeneratorCLI . run (
319
- recipe: recipe, targetTriple: targetTriple, options: self . generatorOptions)
327
+ recipe: recipe,
328
+ targetTriple: targetTriple,
329
+ options: self . generatorOptions
330
+ )
320
331
}
321
332
}
322
333
}
@@ -327,12 +338,19 @@ extension Duration {
327
338
let date = Date ( timeInterval: TimeInterval ( self . components. seconds) , since: reference)
328
339
329
340
let components = Calendar . current. dateComponents (
330
- [ . hour, . minute, . second] , from: reference, to: date)
341
+ [ . hour, . minute, . second] ,
342
+ from: reference,
343
+ to: date
344
+ )
331
345
332
346
if let hours = components. hour, hours > 0 {
333
347
#if !canImport(Darwin) && compiler(<6.0)
334
348
return String (
335
- format: " %02d:%02d:%02d " , hours, components. minute ?? 0 , components. second ?? 0 )
349
+ format: " %02d:%02d:%02d " ,
350
+ hours,
351
+ components. minute ?? 0 ,
352
+ components. second ?? 0
353
+ )
336
354
#else
337
355
return self . formatted ( )
338
356
#endif
0 commit comments