Skip to content

Commit 4282e36

Browse files
authored
Merge branch 'main' into add-bitarray-split
2 parents 02a4db6 + 7914051 commit 4282e36

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
## Unreleased
44

55
- The `bit_array` module gains the `split` and `split_once` functions.
6+
- The performance of `dict.is_empty` has been improved.
7+
8+
## v0.54.0 - 2025-02-04
9+
610
- The `uri` module gains the `empty` value, representing an empty URI which
711
equivalent to `""`.
812

src/gleam/dict.gleam

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ pub fn size(dict: Dict(k, v)) -> Int
5050
/// ```
5151
///
5252
pub fn is_empty(dict: Dict(k, v)) -> Bool {
53-
dict == new()
53+
size(dict) == 0
5454
}
5555

5656
/// Converts the dict to a list of 2-element tuples `#(key, value)`, one for

0 commit comments

Comments
 (0)