Skip to content

Commit

Permalink
Obviate omit parameter in Decodable
Browse files Browse the repository at this point in the history
  • Loading branch information
propensive committed Feb 10, 2025
1 parent d93dba9 commit 623af70
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/codec/anticipation.Decodable.scala
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ package anticipation
import prepositional.*

object Decodable:
given Bytes is Decodable in Bytes = (value, omit) => value
given Bytes is Decodable in Bytes = identity(_)

trait Decodable:
inline def decodable: this.type = this
type Self
type Format

def decode(value: Format, omit: Boolean): Self
def decode(value: Format): Self

def map[SelfType2](lambda: Self => SelfType2): SelfType2 is Decodable in Format =
(value, omit) => lambda(decodable.decode(value, omit))
value => lambda(decodable.decode(value))

0 comments on commit 623af70

Please sign in to comment.