Skip to content

Commit 4282e36

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

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed
 

‎CHANGELOG.md

+4
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

+1-1
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)