mirror of https://github.com/sbt/sbt.git
Merge pull request #1467 from sbt/wip/eviction-warning
Eviction warnings (Fixes #1200)
This commit is contained in:
commit
e1d79ec27a
|
|
@ -0,0 +1,15 @@
|
|||
package sbt
|
||||
|
||||
trait ShowLines[A] {
|
||||
def showLines(a: A): Seq[String]
|
||||
}
|
||||
object ShowLines {
|
||||
def apply[A](f: A => Seq[String]): ShowLines[A] =
|
||||
new ShowLines[A] {
|
||||
def showLines(a: A): Seq[String] = f(a)
|
||||
}
|
||||
|
||||
implicit class ShowLinesOp[A: ShowLines](a: A) {
|
||||
def lines: Seq[String] = implicitly[ShowLines[A]].showLines(a)
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue