Skip to content

Commit

Permalink
replace use of string_builder
Browse files Browse the repository at this point in the history
  • Loading branch information
CrowdHailer committed Dec 20, 2024
1 parent 0c238df commit 2f45311
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions manifest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
# You typically do not need to edit this file

packages = [
{ name = "gleam_json", version = "2.0.0", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "gleam_json", source = "hex", outer_checksum = "CB10B0E7BF44282FB25162F1A24C1A025F6B93E777CCF238C4017E4EEF2CDE97" },
{ name = "gleam_stdlib", version = "0.35.1", build_tools = ["gleam"], requirements = [], otp_app = "gleam_stdlib", source = "hex", outer_checksum = "5443EEB74708454B65650FEBBB1EF5175057D1DEC62AEA9D7C6D96F41DA79152" },
{ name = "gleeunit", version = "1.0.2", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "gleeunit", source = "hex", outer_checksum = "D364C87AFEB26BDB4FB8A5ABDE67D635DC9FA52D6AB68416044C35B096C6882D" },
{ name = "gleam_json", version = "2.1.0", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "gleam_json", source = "hex", outer_checksum = "0A57FB5666E695FD2BEE74C0428A98B0FC11A395D2C7B4CDF5E22C5DD32C74C6" },
{ name = "gleam_stdlib", version = "0.49.0", build_tools = ["gleam"], requirements = [], otp_app = "gleam_stdlib", source = "hex", outer_checksum = "A7DB09F15738198A87255425FBCE049B4B84C77CC522786DC923DABA73911F13" },
{ name = "gleeunit", version = "1.2.0", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "gleeunit", source = "hex", outer_checksum = "F7A7228925D3EE7D0813C922E062BFD6D7E9310F0BEE585D3A42F3307E3CFD13" },
]

[requirements]
Expand Down
8 changes: 4 additions & 4 deletions src/gleam_community/codec.gleam
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
// IMPORTS ---------------------------------------------------------------------

import gleam/dict.{type Dict}
import gleam/dynamic.{
type DecodeError as DynamicError, type Dynamic, DecodeError as DynamicError,
}
import gleam/function
import gleam/int
import gleam/json.{type DecodeError as JsonError, type Json}
import gleam/list
import gleam/dict.{type Dict}
import gleam/option.{type Option}
import gleam/pair
import gleam/result
import gleam/string_builder.{type StringBuilder}
import gleam/int
import gleam/string_tree.{type StringTree}

// TYPES -----------------------------------------------------------------------

Expand Down Expand Up @@ -567,7 +567,7 @@ pub fn encode_string(value: a, codec: Codec(a)) -> String {

///
///
pub fn encode_string_custom_from(value: a, codec: Codec(a)) -> StringBuilder {
pub fn encode_string_custom_from(value: a, codec: Codec(a)) -> StringTree {
codec.encode(value)
|> json.to_string_builder
}
Expand Down

0 comments on commit 2f45311

Please sign in to comment.