Skip to content

Commit 6cea5c7

Browse files
committed
v0.64.0
1 parent 94d18ce commit 6cea5c7

File tree

4 files changed

+6
-22
lines changed

4 files changed

+6
-22
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## v0.64.0 - 2025-09-25
4+
5+
- The `unwrap_both` function of the `result` module has been deprecated.
6+
37
## v0.63.2 - 2025-09-15
48

59
- The performance of the `list.permutations` function has been improved.

gleam.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name = "gleam_stdlib"
2-
version = "0.63.2"
2+
version = "0.64.0"
33
gleam = ">= 1.11.0"
44
licences = ["Apache-2.0"]
55
description = "A standard library for the Gleam programming language"

src/gleam/result.gleam

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -239,21 +239,7 @@ pub fn unwrap_error(result: Result(a, e), or default: e) -> e {
239239
}
240240
}
241241

242-
/// Extracts the inner value from a result. Both the value and error must be of
243-
/// the same type.
244-
///
245-
/// ## Examples
246-
///
247-
/// ```gleam
248-
/// unwrap_both(Error(1))
249-
/// // -> 1
250-
/// ```
251-
///
252-
/// ```gleam
253-
/// unwrap_both(Ok(2))
254-
/// // -> 2
255-
/// ```
256-
///
242+
@deprecated("Use a case expression instead of this function")
257243
pub fn unwrap_both(result: Result(a, a)) -> a {
258244
case result {
259245
Ok(a) -> a

test/gleam/result_test.gleam

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,6 @@ pub fn unwrap_error_test() {
6060
assert result.unwrap_error(Ok("nope"), 50) == 50
6161
}
6262

63-
pub fn unwrap_both_test() {
64-
assert result.unwrap_both(Error(1)) == 1
65-
66-
assert result.unwrap_both(Ok("yup")) == "yup"
67-
}
68-
6963
pub fn lazy_unwrap_test() {
7064
assert result.lazy_unwrap(Ok(1), fn() { 50 }) == 1
7165

0 commit comments

Comments
 (0)