File tree Expand file tree Collapse file tree 3 files changed +8
-26
lines changed Expand file tree Collapse file tree 3 files changed +8
-26
lines changed Original file line number Diff line number Diff line change 11# Changelog
22
3+ ## v0.47.0 - 2024-12-10
4+
5+ - The ` compare ` and ` to_string ` functions from the ` gleam/bool ` module have been
6+ deprecated.
7+
38## v0.46.0 - 2024-12-08
49
510- Improved the performance of comparing two ` Dict ` s of equal size on the
Original file line number Diff line number Diff line change 11name = " gleam_stdlib"
2- version = " 0.46 .0"
2+ version = " 0.47 .0"
33gleam = " >= 0.32.0"
44licences = [" Apache-2.0" ]
55description = " A standard library for the Gleam programming language"
Original file line number Diff line number Diff line change @@ -192,17 +192,7 @@ pub fn exclusive_nor(a: Bool, b: Bool) -> Bool {
192192 a == b
193193}
194194
195- /// Compares two bools and returns the first value's `Order` to the second.
196- ///
197- /// ## Examples
198- ///
199- /// ```gleam
200- /// import gleam/order
201- ///
202- /// compare(True, False)
203- /// // -> order.Gt
204- /// ```
205- ///
195+ @ deprecated ( "Please use a case expression to get the behaviour you desire" )
206196pub fn compare ( a : Bool , with b : Bool ) -> Order {
207197 case a , b {
208198 True , True -> order . Eq
@@ -212,20 +202,7 @@ pub fn compare(a: Bool, with b: Bool) -> Order {
212202 }
213203}
214204
215- /// Returns a numeric representation of the given bool.
216- ///
217- /// ## Examples
218- ///
219- /// ```gleam
220- /// to_int(True)
221- /// // -> 1
222- /// ```
223- ///
224- /// ```gleam
225- /// to_int(False)
226- /// // -> 0
227- /// ```
228- ///
205+ @ deprecated ( "Please use a case expression to get the behaviour you desire" )
229206pub fn to_int ( bool : Bool ) -> Int {
230207 case bool {
231208 False -> 0
You can’t perform that action at this time.
0 commit comments