Skip to content

Commit afdccdb

Browse files
committed
Remove unused Foundation imports
Motivation: A few files unnecesarily import Foundation Modifications: Remove unused imports Result: Fewer dependencies
1 parent 13150bd commit afdccdb

File tree

4 files changed

+3
-7
lines changed

4 files changed

+3
-7
lines changed

Sources/GRPCCodeGen/CodeGenerationRequest.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@
1414
* limitations under the License.
1515
*/
1616

17-
import Foundation
18-
1917
/// Describes the services, dependencies and trivia from an IDL file,
2018
/// and the IDL itself through its specific serializer and deserializer.
2119
public struct CodeGenerationRequest {

Sources/GRPCCodeGen/Internal/Renderer/TextBasedRenderer.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
// SPDX-License-Identifier: Apache-2.0
2727
//
2828
//===----------------------------------------------------------------------===//
29-
import Foundation
3029

3130
/// An object for building up a generated file line-by-line.
3231
///

Sources/GRPCCodeGen/Internal/Translator/Docs.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@
1414
* limitations under the License.
1515
*/
1616

17-
import Foundation
18-
1917
package enum Docs {
2018
package static func suffix(_ header: String, withDocs footer: String) -> String {
2119
if footer.isEmpty {
@@ -58,7 +56,9 @@ package enum Docs {
5856
"""
5957

6058
let body = docs.split(separator: "\n").map { line in
61-
"/// > " + line.dropFirst(4).trimmingCharacters(in: .whitespaces)
59+
var line = "/// > " + line.dropFirst(4)
60+
line.trimPrefix(while: { $0.isWhitespace })
61+
return String(line.drop(while: { $0.isWhitespace }))
6262
}.joined(separator: "\n")
6363

6464
return header + "\n" + body

Sources/GRPCCodeGen/Internal/TypeName.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
// SPDX-License-Identifier: Apache-2.0
2727
//
2828
//===----------------------------------------------------------------------===//
29-
import Foundation
3029

3130
/// A fully-qualified type name that contains the components of the Swift
3231
/// type name.

0 commit comments

Comments
 (0)