Generation de l'architecture compat Swift 6 avec des final class Sendable
This commit is contained in:
		| @@ -55,7 +55,7 @@ struct ConfigurationArchitecture: Codable { | |||||||
|      |      | ||||||
|     func getClass(generateStaticProperty: Bool = true) -> String { |     func getClass(generateStaticProperty: Bool = true) -> String { | ||||||
|         guard children?.isEmpty == false else { |         guard children?.isEmpty == false else { | ||||||
|             return "class \(classname) {}" |             return "final class \(classname): Sendable {}" | ||||||
|         } |         } | ||||||
|          |          | ||||||
|         let classDefinition = [ |         let classDefinition = [ | ||||||
|   | |||||||
| @@ -73,7 +73,7 @@ struct ParsedImage { | |||||||
|             Images.exit(withError: error) |             Images.exit(withError: error) | ||||||
|         } |         } | ||||||
|  |  | ||||||
|         return String(data: data, encoding: .utf8) |         return String(decoding: data, as: UTF8.self) | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     func generateImageContent(isVector: Bool) -> AssetContent { |     func generateImageContent(isVector: Bool) -> AssetContent { | ||||||
|   | |||||||
| @@ -137,9 +137,7 @@ class StringsFileGenerator { | |||||||
|  |  | ||||||
|             let json = try encoder.encode(rootObject) |             let json = try encoder.encode(rootObject) | ||||||
|  |  | ||||||
|             if let jsonString = String(data: json, encoding: .utf8) { |             return String(decoding: json, as: UTF8.self) | ||||||
|                 return jsonString |  | ||||||
|             } |  | ||||||
|  |  | ||||||
|         } catch { |         } catch { | ||||||
|             debugPrint("Failed to encode: \(error)") |             debugPrint("Failed to encode: \(error)") | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user