mirror of
https://github.com/nicoverbruggen/phpmon.git
synced 2025-12-21 03:10:06 +01:00
♻️ Use replacing(with:) instead of .replacingOccurrences(of:with:)
The newer Swift native method is broadly supported and can properly handle complex UTF-8 characters like emoji, whereas the old API does not work correctly with emoji. In most cases, this likely wouldn't have caused any issues but it does make things a little cleaner now, and ensures we won't encounter emoji trouble in the future.
This commit is contained in:
@@ -118,7 +118,7 @@ struct RealFileSystemTest {
|
||||
|
||||
#expect(filesystem.fileExists(executable))
|
||||
|
||||
let newExecutable = executable.replacingOccurrences(of: "/exec.sh", with: "/file.txt")
|
||||
let newExecutable = executable.replacing("/exec.sh", with: "/file.txt")
|
||||
|
||||
try! filesystem.move(from: executable, to: newExecutable)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user