-
Hey there, I'm trying to GRDB 7 beta and noticed that we have to "open" the expression of functions that implicitly take the first-argument, i.e. this change is forced, or I get an issue in regards to function sendability:
This is the change I have to make now and it will be extremely wide to do this everywhere. Wondering if any simple way around it: -let hasEntities = (try? self?.database.read(Entity.fetchOne)) != nil
+let hasEntities = (try? self?.database.read { try Entity.fetchOne($0) }) != nil |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 6 replies
-
Hello @freak4pc :-) This can be fixed by instructing the compiler to stop with the |
Beta Was this translation helpful? Give feedback.
Hello @freak4pc :-)
This can be fixed by instructing the compiler to stop with the
InferSendableFromCaptures
flag :-) See Shorthand Closure Notation in the "Swift Concurrency and GRDB" guide.