Skip to content

Commit a119182

Browse files
committed
Update tutorial examples to use .Client<some ClientTransport> instead of the existential ClientProtocol type.
1 parent 46f1674 commit a119182

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Resources/route-guide-sec06-step06-get-feature.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ extension RouteGuide {
1414
}
1515
}
1616

17-
private func getFeature(using routeGuide: Routeguide_RouteGuide.ClientProtocol) async throws {
17+
private func getFeature(using routeGuide: Routeguide_RouteGuide.Client<some ClientTransport>) async throws {
1818
print("→ Calling 'GetFeature'")
1919

2020
let point = Routeguide_Point.with {

Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Resources/route-guide-sec06-step07-list-features.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ extension RouteGuide {
1515
}
1616
}
1717

18-
private func getFeature(using routeGuide: Routeguide_RouteGuide.ClientProtocol) async throws {
18+
private func getFeature(using routeGuide: Routeguide_RouteGuide.Client<some ClientTransport>) async throws {
1919
print("→ Calling 'GetFeature'")
2020

2121
let point = Routeguide_Point.with {
@@ -27,7 +27,7 @@ extension RouteGuide {
2727
print("Got feature '\(feature.name)'")
2828
}
2929

30-
private func listFeatures(using routeGuide: Routeguide_RouteGuide.ClientProtocol) async throws {
30+
private func listFeatures(using routeGuide: Routeguide_RouteGuide.Client<some ClientTransport>) async throws {
3131
print("→ Calling 'ListFeatures'")
3232

3333
let boundingRectangle = Routeguide_Rectangle.with {

Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Resources/route-guide-sec06-step08-record-route.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ extension RouteGuide {
1616
}
1717
}
1818

19-
private func getFeature(using routeGuide: Routeguide_RouteGuide.ClientProtocol) async throws {
19+
private func getFeature(using routeGuide: Routeguide_RouteGuide.Client<some ClientTransport>) async throws {
2020
print("→ Calling 'GetFeature'")
2121

2222
let point = Routeguide_Point.with {
@@ -28,7 +28,7 @@ extension RouteGuide {
2828
print("Got feature '\(feature.name)'")
2929
}
3030

31-
private func listFeatures(using routeGuide: Routeguide_RouteGuide.ClientProtocol) async throws {
31+
private func listFeatures(using routeGuide: Routeguide_RouteGuide.Client<some ClientTransport>) async throws {
3232
print("→ Calling 'ListFeatures'")
3333

3434
let boundingRectangle = Routeguide_Rectangle.with {
@@ -51,7 +51,7 @@ extension RouteGuide {
5151
}
5252
}
5353

54-
private func recordRoute(using routeGuide: Routeguide_RouteGuide.ClientProtocol) async throws {
54+
private func recordRoute(using routeGuide: Routeguide_RouteGuide.Client<some ClientTransport>) async throws {
5555
print("→ Calling 'RecordRoute'")
5656

5757
let features = try self.loadFeatures()

Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Resources/route-guide-sec06-step09-route-chat.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ extension RouteGuide {
1717
}
1818
}
1919

20-
private func getFeature(using routeGuide: Routeguide_RouteGuide.ClientProtocol) async throws {
20+
private func getFeature(using routeGuide: Routeguide_RouteGuide.Client<some ClientTransport>) async throws {
2121
print("→ Calling 'GetFeature'")
2222

2323
let point = Routeguide_Point.with {
@@ -29,7 +29,7 @@ extension RouteGuide {
2929
print("Got feature '\(feature.name)'")
3030
}
3131

32-
private func listFeatures(using routeGuide: Routeguide_RouteGuide.ClientProtocol) async throws {
32+
private func listFeatures(using routeGuide: Routeguide_RouteGuide.Client<some ClientTransport>) async throws {
3333
print("→ Calling 'ListFeatures'")
3434

3535
let boundingRectangle = Routeguide_Rectangle.with {
@@ -52,7 +52,7 @@ extension RouteGuide {
5252
}
5353
}
5454

55-
private func recordRoute(using routeGuide: Routeguide_RouteGuide.ClientProtocol) async throws {
55+
private func recordRoute(using routeGuide: Routeguide_RouteGuide.Client<some ClientTransport>) async throws {
5656
print("→ Calling 'RecordRoute'")
5757

5858
let features = try self.loadFeatures()
@@ -74,7 +74,7 @@ extension RouteGuide {
7474
)
7575
}
7676

77-
private func routeChat(using routeGuide: Routeguide_RouteGuide.ClientProtocol) async throws {
77+
private func routeChat(using routeGuide: Routeguide_RouteGuide.Client<some ClientTransport>) async throws {
7878
print("→ Calling 'RouteChat'")
7979

8080
try await routeGuide.routeChat { writer in

0 commit comments

Comments
 (0)