You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With the change in #163 the behaviour of union changed and the documentation is wrong now. It's unfortunate that such a breaking change is done in a minor version.
The comment says
/// Construct the union of two maps, keeping the values in the/// current map when keys exist in both maps.
This is not the case anymore when the first map is the shorter one.
Adapting the example from the function description, the following fails
let map1 = hashmap!{1 => 1};let map2 = hashmap!{1 => 2, 2 => 3};let expected = hashmap!{1 => 1, 2 => 3};assert_eq!(expected, map1.union(map2));// the result is actually {2: 3, 1: 2}
Is this change in behaviour intentional? If it is intentional, the documentation should be changed and the new behaviour should be made clear in the release notes.
The text was updated successfully, but these errors were encountered:
With the change in #163 the behaviour of
union
changed and the documentation is wrong now. It's unfortunate that such a breaking change is done in a minor version.The comment says
This is not the case anymore when the first map is the shorter one.
Adapting the example from the function description, the following fails
Is this change in behaviour intentional? If it is intentional, the documentation should be changed and the new behaviour should be made clear in the release notes.
The text was updated successfully, but these errors were encountered: