1
0
mirror of https://github.com/apple/swift-nio-extras.git synced 2025-05-25 15:41:01 +08:00

Fix concurrency warning ()

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

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