mirror of
https://github.com/apple/swift-nio-extras.git
synced 2025-05-14 08:52:42 +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
|
||||
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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user