Fix a "discarded non-Unit value" warning in FileExamplesTest

This commit is contained in:
Dale Wijnand 2018-02-01 15:21:34 +00:00
parent 78f4f56d1c
commit 6f52437e95
No known key found for this signature in database
GPG Key ID: 4F256E3D151DF5EF
1 changed files with 3 additions and 1 deletions

View File

@ -9,6 +9,7 @@ package sbt.internal.util
package complete
import java.io.File
import org.scalatest.Assertion
import sbt.io.IO
class FileExamplesTest extends UnitSpec {
@ -57,7 +58,8 @@ class FileExamplesTest extends UnitSpec {
}
def withDirectoryStructure[A](withCompletionPrefix: String = "")(
thunk: DirectoryStructure => A): Unit = {
thunk: DirectoryStructure => Assertion
): Assertion = {
IO.withTemporaryDirectory { tempDir =>
val ds = new DirectoryStructure(withCompletionPrefix)
ds.createSampleDirStructure(tempDir)