-
Notifications
You must be signed in to change notification settings - Fork 87
Closed
Description
In Scala 2.11, Source is not Closeable so that Using(new Source(...)) results in
[error] ...: could not find implicit value for parameter releasable: scala.util.Using.Releasable[scala.io.BufferedSource]
[error] Using.resource(Source.fromFile(...)) { source =>
[error] ^
[error] one error found
This can be worked around with code like
implicit object SourceReleaser extends Releasable[Source] {
override def release(resource: Source): Unit = resource.close
}
If I add that somewhere, I believe that an additional import will be needed in my code. If it gets added somewhere inside scala.util.Using, which seems to be part of this project, the extra import might not be necessary and that would be very nice to have.
Metadata
Metadata
Assignees
Labels
No labels