mirror of
https://github.com/apple/swift-nio-extras.git
synced 2025-05-25 15:41:01 +08:00
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:
parent
344a517828
commit
0cd4cc3e38
@ -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.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user