Skip to content

Commit d4742d2

Browse files
committed
Swift: 'Data' should be a struct.
1 parent e196caa commit d4742d2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

swift/ql/test/query-tests/Security/CWE-311/testSend.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
// --- stubs ---
33

4-
class Data {
4+
struct Data {
55
init<S>(_ elements: S) {}
66
}
77

@@ -13,7 +13,7 @@ class NWConnection {
1313
class ContentContext {
1414
static let defaultMessage = ContentContext()
1515
}
16-
16+
1717
func send(content: Data?, contentContext: NWConnection.ContentContext = .defaultMessage, isComplete: Bool = true, completion: NWConnection.SendCompletion) { }
1818
func send<Content>(content: Content?, contentContext: NWConnection.ContentContext = .defaultMessage, isComplete: Bool = true, completion: NWConnection.SendCompletion) { }
1919
}

0 commit comments

Comments
 (0)