Skip to content

Commit

Permalink
Fix dynamic/decode new_primitive_decoder example
Browse files Browse the repository at this point in the history
  • Loading branch information
jcorentin authored Dec 23, 2024
1 parent dfaebe9 commit 6cef070
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/gleam/dynamic/decode.gleam
Original file line number Diff line number Diff line change
Expand Up @@ -975,9 +975,9 @@ pub fn failure(zero: a, expected: String) -> Decoder(a) {
/// pub fn string_decoder() -> decode.Decoder(String) {
/// let default = ""
/// decode.new_primitive_decoder("String", fn(data) {
/// case dynamic.string {
/// case dynamic.string(data) {
/// Ok(x) -> Ok(x)
/// Error(x) -> Error(default)
/// Error(_) -> Error(default)
/// }
/// })
/// }
Expand Down

0 comments on commit 6cef070

Please sign in to comment.