Skip to content

Commit 06c8b36

Browse files
committed
Remove unnecessary DumpOutput custom type
Hat tip @crazytonyli #93 (comment)
1 parent 86c56f1 commit 06c8b36

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

Sources/Track.swift

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -84,15 +84,7 @@ class Track {
8484

8585
/// Utitlity to log sending event with a dump of the event.
8686
private func os_log_sending_event(_ event: Event, log: OSLog = .tracker, type: OSLogType = .debug) {
87-
var eventDump = DumpOutput()
87+
var eventDump = ""
8888
dump(event.toDict(), to: &eventDump)
89-
os_log("Sending an event from Track:\n%@", log: log, type: type, eventDump.content)
90-
}
91-
92-
private struct DumpOutput: TextOutputStream {
93-
private(set) var content = ""
94-
95-
mutating func write(_ string: String) {
96-
content.append(string)
97-
}
89+
os_log("Sending an event from Track:\n%@", log: log, type: type, eventDump)
9890
}

0 commit comments

Comments
 (0)