Skip to content

Commit c4f6dc7

Browse files
author
Louis Bettens
committed
avoid exposing private type in API
OpenFile is a private implementation of Using, so it's clearer for library users to just see Using instead.
1 parent ca3deaf commit c4f6dc7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

io/src/main/scala/sbt/io/Using.scala

+2-2
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,9 @@ object Using {
6969
def close(s: T) = closeF(s)
7070
}
7171

72-
def file[T <: AutoCloseable](openF: File => T): OpenFile[T] = file(openF, closeCloseable)
72+
def file[T <: AutoCloseable](openF: File => T): Using[File, T] = file(openF, closeCloseable)
7373

74-
def file[T](openF: File => T, closeF: T => Unit): OpenFile[T] =
74+
def file[T](openF: File => T, closeF: T => Unit): Using[File, T] =
7575
new OpenFile[T] {
7676
def openImpl(file: File) = openF(file)
7777
def close(t: T) = closeF(t)

0 commit comments

Comments
 (0)