Fix concurrency warning (#153)

Motivation:

A clean build is good.

Modifications:

Make the warning string for debug mode a let constant.

Result:

No warning about concurrency safety.

Co-authored-by: Peter Adams <peteradamshc76@gmail.com>
This commit is contained in:
Peter Adams 2022-03-20 12:29:58 +00:00 committed by GitHub
parent 344a517828
commit 0cd4cc3e38
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -13,14 +13,17 @@
//===----------------------------------------------------------------------===//
// MARK: Setup
var warning: String = ""
assert({
print("============================================================")
print("= YOU ARE RUNNING NIOExtrasPerformanceTester IN DEBUG MODE =")
print("============================================================")
warning = " <<< DEBUG MODE >>>"
return true
}())
let warning: String = {
var warning: String = ""
assert({
print("============================================================")
print("= YOU ARE RUNNING NIOExtrasPerformanceTester IN DEBUG MODE =")
print("============================================================")
warning = " <<< DEBUG MODE >>>"
return true
}())
return warning
}()
// MARK: Tests
// Test PCAP to file.