Skip to content

Commit

Permalink
PR feedback: Avoid constAbsent function allocation in Maybe.collect
Browse files Browse the repository at this point in the history
Co-authored-by: Flavio Brasil <fwbrasil@users.noreply.github.com>
  • Loading branch information
matteobilardi and fwbrasil authored Mar 5, 2025
1 parent fbd000f commit 9d25e05
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kyo-data/shared/src/main/scala/kyo/Maybe.scala
Original file line number Diff line number Diff line change
Expand Up @@ -440,6 +440,6 @@ object Maybe:
new PresentAbsent(depth)
end PresentAbsent

def constAbsent(ignored: Any): Absent = Absent
private val constAbsent: Any => Absent = _ => Absent
end internal
end Maybe

0 comments on commit 9d25e05

Please sign in to comment.