The implementation of PartialEq for Value is handcrafted. It is
composed of a huge match expression, which aims to properly compare
each variant of the left-hand and the right-hand Values. The last arm
is a catchall arm, supposed to catch every case where both variant does
not match.
The problem is that no match arm in the said expression handles the
Ipv4, Ipv6 and Uuid variants. As such, two IP addresses are always
considered as not equal. Similarly, two UUIDs are always considered as
not equal.
This commit adds three missing arms, which adds proper IP address
comparison as well as proper UUID comparison.
Compare IP adresses and UUID properly
The implementation of
PartialEq
forValue
is handcrafted. It is composed of a hugematch
expression, which aims to properly compare each variant of the left-hand and the right-handValues
. The last arm is a catchall arm, supposed to catch every case where both variant does not match.The problem is that no match arm in the said expression handles the
Ipv4
,Ipv6
andUuid
variants. As such, two IP addresses are always considered as not equal. Similarly, two UUIDs are always considered as not equal.This commit adds three missing arms, which adds proper IP address comparison as well as proper UUID comparison.