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
Currently, Key and Value can only be built with FromStr. When we have a String, we are forced to do let key: Key = string.parse().unwrap() (e.g. here).
It would make it cleaner to have a fn new(s: String) -> Self constructor.
Definition of "done"
Key and Value have a fn new(s: String) -> Self constructor.
The text was updated successfully, but these errors were encountered:
If there's no invariant being enforced, you might as well make the inner String member of the newtype tuple struct pub, rather than adding an infallible constructor.
Description
Currently,
Key
andValue
can only be built withFromStr
. When we have aString
, we are forced to dolet key: Key = string.parse().unwrap()
(e.g. here).It would make it cleaner to have a
fn new(s: String) -> Self
constructor.Definition of "done"
Key
andValue
have afn new(s: String) -> Self
constructor.The text was updated successfully, but these errors were encountered: