How to use Using.Manager with Scala 3 given #18318
AugustNagro
started this conversation in
General Discussion
Replies: 2 comments 4 replies
-
Can you provide a complete piece of code that compiles in Scala 2? |
Beta Was this translation helpful? Give feedback.
1 reply
-
inline def managed[T](inline op: Using.Manager ?=> T): Try[T] =
Using.Manager(op(using _))
managed:
runProgram() |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In Scala 2, it's common to write
How can we convert this to Scala 3?
Beta Was this translation helpful? Give feedback.
All reactions