报告 find 和空性检查,并建议改用 exists。
find
exists
示例:
var x: Seq[Int] x.find(p).isDefined x.find(p) != None x.find(p).isEmpty
在应用快速修复后:
var x: Seq[Int] x.exists(p) x.exists(p) !x.exists(p)