reuse nonEmpty in notNew

This commit is contained in:
Greg Finley 2020-03-01 21:47:57 -08:00
parent 115bc2092b
commit eaf082ede9

View file

@ -255,7 +255,7 @@ case object Perfs {
) )
} }
private def notNew(p: Perf): Option[Perf] = p.latest.isDefined option p private def notNew(p: Perf): Option[Perf] = p.nonEmpty option p
def writes(w: BSON.Writer, o: Perfs) = reactivemongo.api.bson.BSONDocument( def writes(w: BSON.Writer, o: Perfs) = reactivemongo.api.bson.BSONDocument(
"standard" -> notNew(o.standard), "standard" -> notNew(o.standard),