Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commite2a0f1b

Browse files
committed
account for swift 6 sendable's house of cards
1 parent2a8ab20 commite2a0f1b

File tree

3 files changed

+7
-14
lines changed

3 files changed

+7
-14
lines changed

‎Coder-Desktop/Coder-DesktopTests/FilePickerTests.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,8 @@ struct FilePickerTests {
103103
try disclosureGroup.expand()
104104

105105
// Disclosure group should expand out to 3 more directories
106-
try#expect(awaiteventually{@MainActorin
107-
returntryview.findAll(ViewType.DisclosureGroup.self).count==6
106+
#expect(awaiteventually{@MainActorin
107+
return view.findAll(ViewType.DisclosureGroup.self).count==6
108108
})
109109
}
110110
}

‎Coder-Desktop/Coder-DesktopTests/FileSyncDaemonTests.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,9 @@ class FileSyncDaemonTests {
8181
// Write a file to Alpha
8282
letalphaFile= mutagenAlphaDirectory.appendingPathComponent("test.txt")
8383
try"Hello, World!".write(to: alphaFile, atomically:true, encoding:.utf8)
84-
try#expect(
84+
#expect(
8585
awaiteventually(timeout:.seconds(5), interval:.milliseconds(100)){@MainActorin
86-
returntryFileManager.default.fileExists(
86+
returnFileManager.default.fileExists(
8787
atPath:self.mutagenBetaDirectory.appending(path:"test.txt").path()
8888
)
8989
})

‎Coder-Desktop/Coder-DesktopTests/Util.swift

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -61,26 +61,19 @@ extension Inspection: @unchecked Sendable, @retroactive InspectionEmissary {}
6161
publicfunc eventually(
6262
timeout:Duration=.milliseconds(500),
6363
interval:Duration=.milliseconds(10),
64-
condition:@escaping()asyncthrows->Bool
65-
)asyncthrows->Bool{
64+
condition:@Sendable()asyncthrows->Bool
65+
)asyncrethrows->Bool{
6666
letendTime=ContinuousClock.now.advanced(by: timeout)
6767

68-
varlastError:Error?
69-
7068
whileContinuousClock.now< endTime{
7169
do{
7270
iftryawaitcondition(){returntrue}
73-
lastError=nil
7471
}catch{
75-
lastError= error
7672
tryawaitTask.sleep(for: interval)
7773
}
7874
}
7975

80-
iflet lastError{
81-
throw lastError
82-
}
83-
returnfalse
76+
returntryawaitcondition()
8477
}
8578

8679
extensionFileManager{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp