mirror of
https://github.com/nicoverbruggen/phpmon.git
synced 2026-04-01 17:20:09 +02:00
♻️ Use discardableResult
- Removed ShellProtocol.quiet(), now that pipe() is discardable - Detecting PHP versions is also discardable - The system command is also discardable This is a nice quality of life change overall, and gets rid of a couple of silly `_ =` assignments.
This commit is contained in:
@@ -63,7 +63,7 @@ struct RealFileSystemTest {
|
||||
#expect(filesystem.directoryExists("\(temporaryDirectory)/brew/etc/lib"))
|
||||
#expect(filesystem.directoryExists("\(temporaryDirectory)/brew/etc/lib/c"))
|
||||
|
||||
_ = system("ln -s \(temporaryDirectory)/brew/etc/lib/c \(temporaryDirectory)/c")
|
||||
system("ln -s \(temporaryDirectory)/brew/etc/lib/c \(temporaryDirectory)/c")
|
||||
#expect(filesystem.directoryExists("\(temporaryDirectory)/c"))
|
||||
#expect(filesystem.isSymlink("\(temporaryDirectory)/c"))
|
||||
#expect(
|
||||
|
||||
@@ -89,9 +89,9 @@ struct RealShellTest {
|
||||
let start = ContinuousClock.now
|
||||
|
||||
await withTaskGroup(of: Void.self) { group in
|
||||
group.addTask { await container.shell.quiet("php -r \"usleep(700000);\"") }
|
||||
group.addTask { await container.shell.quiet("php -r \"usleep(700000);\"") }
|
||||
group.addTask { await container.shell.quiet("php -r \"usleep(700000);\"") }
|
||||
group.addTask { await container.shell.pipe("php -r \"usleep(700000);\"") }
|
||||
group.addTask { await container.shell.pipe("php -r \"usleep(700000);\"") }
|
||||
group.addTask { await container.shell.pipe("php -r \"usleep(700000);\"") }
|
||||
}
|
||||
|
||||
let duration = start.duration(to: .now)
|
||||
|
||||
Reference in New Issue
Block a user