Skip to content

Commit

Permalink
Missed comments on #1704.
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasvl committed Aug 29, 2024
1 parent 237a664 commit f3b1a7d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Sources/protoc-gen-swift/Descriptor+Extensions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ extension FileDescriptor {
return SwiftProtobufInfo.isBundledProto(file: self)
}

// Returns true if the file will beed to import Foundation.
// Returns true if the file will need to import Foundation.
//
// `bytes` fields are modeled as `Data`, that is currently the only reason
// why the generated sources need to `import Foundation`.
Expand Down Expand Up @@ -182,6 +182,10 @@ extension Descriptor {
/// Returns true if the message should use the message set wireformat.
var useMessageSetWireFormat: Bool { return options.messageSetWireFormat }

/// Returns true if the file will need to import Foundation.
///
/// `bytes` fields are modeled as `Data`, that is currently the only reason
/// why the generated sources need to `import Foundation`.
var needsFoundationImport: Bool {
if fields.contains(where: { $0.type == .bytes }) {
return true
Expand Down

0 comments on commit f3b1a7d

Please sign in to comment.