From 2a19c4b13c3f8cf18b8b176d729908b8303f36cd Mon Sep 17 00:00:00 2001 From: Peter Date: Tue, 19 Dec 2023 19:53:47 +0100 Subject: [PATCH] upgrades to work with latest gleam version --- src/gleam_community/codec.gleam | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/src/gleam_community/codec.gleam b/src/gleam_community/codec.gleam index 6eb4496..711ab18 100644 --- a/src/gleam_community/codec.gleam +++ b/src/gleam_community/codec.gleam @@ -1,14 +1,14 @@ // IMPORTS --------------------------------------------------------------------- -import gleam/dynamic.{DecodeError as DynamicError, Dynamic} +import gleam/dynamic.{type DecodeError as DynamicError, DecodeError as DynamicError, type Dynamic} import gleam/function -import gleam/json.{DecodeError as JsonError, Json} +import gleam/json.{type DecodeError as JsonError, type Json} import gleam/list -import gleam/map.{Map} -import gleam/option.{Option} +import gleam/map.{type Map} +import gleam/option.{type Option} import gleam/pair import gleam/result -import gleam/string_builder.{StringBuilder} +import gleam/string_builder.{type StringBuilder} import gleam/int // TYPES ----------------------------------------------------------------------- @@ -97,12 +97,6 @@ pub fn string() -> Codec(String) { Codec(encode: json.string, decode: dynamic.string) } -/// -/// -pub fn bool() -> Codec(Bool) { - Codec(encode: json.bool, decode: dynamic.bool) -} - /// /// pub fn bool() {