diff options
author | Louis Pilfold <louis@lpil.uk> | 2024-07-12 14:42:24 +0100 |
---|---|---|
committer | Louis Pilfold <louis@lpil.uk> | 2024-07-12 15:02:22 +0100 |
commit | fbe6522c37b481393c49b005477858f72243a5b0 (patch) | |
tree | b48844bcf6c92a7ff56ba380d9592b655b9bdb4b /src | |
parent | 34aada5925bd0f73b16f855aafc47c08d45c73a7 (diff) | |
download | gleam_stdlib-fbe6522c37b481393c49b005477858f72243a5b0.tar.gz gleam_stdlib-fbe6522c37b481393c49b005477858f72243a5b0.zip |
No unsafe
Diffstat (limited to 'src')
-rw-r--r-- | src/gleam/dynamic.gleam | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/src/gleam/dynamic.gleam b/src/gleam/dynamic.gleam index 731d3e2..bac548a 100644 --- a/src/gleam/dynamic.gleam +++ b/src/gleam/dynamic.gleam @@ -26,22 +26,9 @@ pub type Decoder(t) = /// Converts any Gleam data into `Dynamic` data. /// -pub fn from(a) -> Dynamic { - do_from(a) -} - -@external(erlang, "gleam_stdlib", "identity") -@external(javascript, "../gleam_stdlib.mjs", "identity") -fn do_from(a: anything) -> Dynamic - -@deprecated("This function undermines the type system and opens the door to cryptic runtime errors and incorrect behaviour") -pub fn unsafe_coerce(a: Dynamic) -> anything { - do_unsafe_coerce(a) -} - @external(erlang, "gleam_stdlib", "identity") @external(javascript, "../gleam_stdlib.mjs", "identity") -fn do_unsafe_coerce(a: Dynamic) -> a +pub fn from(a: anything) -> Dynamic /// Decodes a `Dynamic` value from a `Dynamic` value. /// |