mirror of
https://github.com/twitter/the-algorithm.git
synced 2024-12-22 18:21:51 +01:00
Fix none was Lowercase fixed for right Option Type
This commit is contained in:
parent
376f35f08f
commit
645342ba2f
@ -103,7 +103,7 @@ object KnownForSources {
|
|||||||
.from(TextLine(textFile))
|
.from(TextLine(textFile))
|
||||||
.flatMap { str =>
|
.flatMap { str =>
|
||||||
str match {
|
str match {
|
||||||
case s"#$_" => none
|
case s"#$_" => None
|
||||||
case _ => try {
|
case _ => try {
|
||||||
val tokens = str.trim.split("\\s+")
|
val tokens = str.trim.split("\\s+")
|
||||||
val userId = tokens(0).toLong
|
val userId = tokens(0).toLong
|
||||||
@ -115,7 +115,7 @@ object KnownForSources {
|
|||||||
r += newEntry
|
r += newEntry
|
||||||
}).result() match {
|
}).result() match {
|
||||||
case (res) if res.nonEmpty => Some((userId, res.result()))
|
case (res) if res.nonEmpty => Some((userId, res.result()))
|
||||||
_ => none
|
_ => None
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch {
|
catch {
|
||||||
|
Loading…
Reference in New Issue
Block a user