File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
Sources/GRPCProtobufCodeGen Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -98,12 +98,13 @@ package struct ProtobufCodeGenParser {
98
98
99
99
extension ProtobufCodeGenParser {
100
100
fileprivate func codeDependencies( file: FileDescriptor ) -> [ Dependency ] {
101
- var codeDependencies : [ Dependency ] = [ ]
102
-
103
- if file. services. count > 0 {
104
- codeDependencies. append ( Dependency ( module: " GRPCProtobuf " , accessLevel: . internal) )
101
+ guard file. services. count > 0 else {
102
+ return [ ]
105
103
}
106
104
105
+ var codeDependencies : [ Dependency ] = [
106
+ Dependency ( module: " GRPCProtobuf " , accessLevel: . internal)
107
+ ]
107
108
// If there's a dependency on a bundled proto then add the SwiftProtobuf import.
108
109
//
109
110
// Importing SwiftProtobuf unconditionally results in warnings in the generated
You can’t perform that action at this time.
0 commit comments