Skip to content

Commit

Permalink
Use exists instead of fold
Browse files Browse the repository at this point in the history
  • Loading branch information
jcazevedo committed Oct 21, 2018
1 parent e505e67 commit bfc162a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion macros/src/main/scala/pureconfig/Derivation.scala
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class DerivationMacros(val c: whitebox.Context) extends LazyContextParser with M
// messages
val isMaterializationExplicitCall = {
val firstMacroCall = c.enclosingMacros.reverse.find(ctx => ctx.prefix.tree.tpe =:= ctx.typeOf[Derivation.type])
firstMacroCall.fold(false)(_.openImplicits.isEmpty)
firstMacroCall.exists(_.openImplicits.isEmpty)
}

// Determine what to do if an implicit search fails. If we're in the context of an implicit search, we want to set
Expand Down

0 comments on commit bfc162a

Please sign in to comment.