Skip to content

Commit 67a9b81

Browse files
committed
SwiftifyImport: Fix warnings.
Fixes the following warnings: ``` warning: no calls to throwing functions occur within 'try' expression warning: default will never be executed ```
1 parent 33bff48 commit 67a9b81

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/Macros/Sources/SwiftMacros/SwiftifyImportMacro.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ struct CxxSpanThunkBuilder: BoundsCheckedThunkBuilder {
314314
"unable to desugar type with name '\(typeName)'", node: node)
315315
}
316316

317-
let parsedDesugaredType = try TypeSyntax("\(raw: desugaredType)")
317+
let parsedDesugaredType = TypeSyntax("\(raw: desugaredType)")
318318
types[index] = TypeSyntax(IdentifierTypeSyntax(name: "Span",
319319
genericArgumentClause: parsedDesugaredType.as(IdentifierTypeSyntax.self)!.genericArgumentClause))
320320
return try base.buildFunctionSignature(types, variant)
@@ -679,7 +679,7 @@ public struct SwiftifyImportMacro: PeerMacro {
679679
}
680680
dict[key.representedLiteralValue!] = value.representedLiteralValue!
681681
}
682-
default:
682+
@unknown default:
683683
throw DiagnosticError("unknown dictionary literal", node: dictExpr)
684684
}
685685
return dict

0 commit comments

Comments
 (0)