Skip to content
This repository was archived by the owner on Aug 17, 2019. It is now read-only.

Commit a091d1b

Browse files
committed
Move to the new Env API
1 parent 964144f commit a091d1b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/main/scala/com/ckkloverdos/props/Props.scala

+3-1
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,9 @@ class Props(val map: Map[String, String])(implicit conv: Converters = Converters
100100
case _ other == this.map
101101
}
102102

103-
def toEnv: Env = new Env(map map { case (k, v) (StringKey(k), v)})
103+
def toEnv: Env = {
104+
map.foldLeft(Env())((env, kv) env + (StringKey(kv._1), kv._2))
105+
}
104106

105107
def group(keyPrefix: String): Props = {
106108
val dottedPrefix = keyPrefix + "."

0 commit comments

Comments
 (0)