1
0
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:
2026-02-17 15:17:34 +01:00
parent d0ce16fad2
commit 9856840533
27 changed files with 55 additions and 70 deletions

View File

@@ -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(

View File

@@ -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)