Skip to content

Commit

Permalink
v0.47.0
Browse files Browse the repository at this point in the history
  • Loading branch information
lpil committed Dec 10, 2024
1 parent 370a060 commit f15d41b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 26 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## v0.47.0 - 2024-12-10

- The `compare` and `to_string` functions from the `gleam/bool` module have been

This comment has been minimized.

Copy link
@danielytics

danielytics Dec 10, 2024

There’s a typo here: it’s the compare and to_int functions that have been deprecated.

deprecated.

## v0.46.0 - 2024-12-08

- Improved the performance of comparing two `Dict`s of equal size on the
Expand Down
2 changes: 1 addition & 1 deletion gleam.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name = "gleam_stdlib"
version = "0.46.0"
version = "0.47.0"
gleam = ">= 0.32.0"
licences = ["Apache-2.0"]
description = "A standard library for the Gleam programming language"
Expand Down
27 changes: 2 additions & 25 deletions src/gleam/bool.gleam
Original file line number Diff line number Diff line change
Expand Up @@ -192,17 +192,7 @@ pub fn exclusive_nor(a: Bool, b: Bool) -> Bool {
a == b
}

/// Compares two bools and returns the first value's `Order` to the second.
///
/// ## Examples
///
/// ```gleam
/// import gleam/order
///
/// compare(True, False)
/// // -> order.Gt
/// ```
///
@deprecated("Please use a case expression to get the behaviour you desire")
pub fn compare(a: Bool, with b: Bool) -> Order {
case a, b {
True, True -> order.Eq
Expand All @@ -212,20 +202,7 @@ pub fn compare(a: Bool, with b: Bool) -> Order {
}
}

/// Returns a numeric representation of the given bool.
///
/// ## Examples
///
/// ```gleam
/// to_int(True)
/// // -> 1
/// ```
///
/// ```gleam
/// to_int(False)
/// // -> 0
/// ```
///
@deprecated("Please use a case expression to get the behaviour you desire")
pub fn to_int(bool: Bool) -> Int {
case bool {
False -> 0
Expand Down

0 comments on commit f15d41b

Please sign in to comment.