mirror of https://github.com/sbt/sbt.git
Merge pull request #5545 from eed3si9n/fport/duplicated-strings
[fport] Avoid tens of thousands of duplicated "TypeFuntions.const(())" strings
This commit is contained in:
commit
9eedbce815
|
|
@ -80,7 +80,7 @@ final case class Task[T](info: Info[T], work: Action[T]) {
|
|||
*/
|
||||
final case class Info[T](
|
||||
attributes: AttributeMap = AttributeMap.empty,
|
||||
post: T => AttributeMap = const(AttributeMap.empty)
|
||||
post: T => AttributeMap = Info.defaultAttributeMap
|
||||
) {
|
||||
import Info._
|
||||
def name = attributes.get(Name)
|
||||
|
|
@ -96,4 +96,5 @@ final case class Info[T](
|
|||
object Info {
|
||||
val Name = AttributeKey[String]("name")
|
||||
val Description = AttributeKey[String]("description")
|
||||
val defaultAttributeMap = const(AttributeMap.empty)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue