Skip to content

Commit 5009983

Browse files
authored
Merge pull request #34 from Drewsmits/develop
Changed String init to use Linux friendly implementation
2 parents 8f9c7ff + e6767b6 commit 5009983

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Examples/Echo/Generated/echo.server.pb.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -274,8 +274,8 @@ public class Echo_EchoServer {
274274
self.address = address
275275
self.provider = provider
276276
guard
277-
let certificate = try? String(contentsOf: certificateURL),
278-
let key = try? String(contentsOf: keyURL)
277+
let certificate = try? String(contentsOf: certificateURL, encoding: .utf8),
278+
let key = try? String(contentsOf: keyURL, encoding: .utf8)
279279
else {
280280
return nil
281281
}

Plugin/Templates/server.pb.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,8 @@ public class {{ .|server:protoFile,service }} {
121121
self.address = address
122122
self.provider = provider
123123
guard
124-
let certificate = try? String(contentsOf: certificateURL),
125-
let key = try? String(contentsOf: keyURL)
124+
let certificate = try? String(contentsOf: certificateURL, encoding: .utf8),
125+
let key = try? String(contentsOf: keyURL, encoding: .utf8)
126126
else {
127127
return nil
128128
}

0 commit comments

Comments
 (0)