mirror of https://github.com/sbt/sbt.git
Follow deprecation - @deprecated says to use pair and so it's used in the body
This commit is contained in:
parent
b75442b4a3
commit
5c268bd9ea
|
|
@ -124,18 +124,14 @@ sealed abstract class PathFinder
|
||||||
* If the result is empty (None) and `errorIfNone` is true, an exception is thrown.
|
* If the result is empty (None) and `errorIfNone` is true, an exception is thrown.
|
||||||
* If `errorIfNone` is false, the path is dropped from the returned Traversable.*/
|
* If `errorIfNone` is false, the path is dropped from the returned Traversable.*/
|
||||||
def pair[T](mapper: File => Option[T], errorIfNone: Boolean = true): Seq[(File,T)] =
|
def pair[T](mapper: File => Option[T], errorIfNone: Boolean = true): Seq[(File,T)] =
|
||||||
x(mapper, errorIfNone)
|
|
||||||
|
|
||||||
/** Applies `mapper` to each path selected by this PathFinder and returns the path paired with the non-empty result.
|
|
||||||
* If the result is empty (None) and `errorIfNone` is true, an exception is thrown.
|
|
||||||
* If `errorIfNone` is false, the path is dropped from the returned Traversable.*/
|
|
||||||
@deprecated("Use pair.", "0.13.1")
|
|
||||||
def x[T](mapper: File => Option[T], errorIfNone: Boolean = true): Seq[(File,T)] =
|
|
||||||
{
|
{
|
||||||
val apply = if(errorIfNone) mapper | fail else mapper
|
val apply = if(errorIfNone) mapper | fail else mapper
|
||||||
for(file <- get; mapped <- apply(file)) yield (file, mapped)
|
for(file <- get; mapped <- apply(file)) yield (file, mapped)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@deprecated("Use pair.", "0.13.1")
|
||||||
|
def x[T](mapper: File => Option[T], errorIfNone: Boolean = true): Seq[(File,T)] = pair(mapper, errorIfNone)
|
||||||
|
|
||||||
/** Selects all descendant paths with a name that matches <code>include</code> and do not have an intermediate
|
/** Selects all descendant paths with a name that matches <code>include</code> and do not have an intermediate
|
||||||
* path with a name that matches <code>intermediateExclude</code>. Typical usage is:
|
* path with a name that matches <code>intermediateExclude</code>. Typical usage is:
|
||||||
*
|
*
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue