In the current implementation, methods on a value of KeyValue type, returns a ref type (&Key or &Value).
However, in most cases, this is followed by a clone, in-order to get a owned value of either Key or Value type. Therefore, the API can be simplified to
In the current implementation, methods on a value of KeyValue type, returns a ref type (
&Key
or&Value
).However, in most cases, this is followed by a clone, in-order to get a owned value of either
Key
orValue
type. Therefore, the API can be simplified toThis is a breaking change, so schedule it for 0.3 release.