Skip to content

Commit fcf9980

Browse files
committed
chore(array): impl From<String> for ArrayKey
1 parent b9f2d97 commit fcf9980

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/types/array.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -689,6 +689,12 @@ pub enum ArrayKey<'a> {
689689
Str(&'a str),
690690
}
691691

692+
impl From<String> for ArrayKey<'_> {
693+
fn from(value: String) -> Self {
694+
Self::String(value)
695+
}
696+
}
697+
692698
impl ArrayKey<'_> {
693699
/// Check if the key is an integer.
694700
///

0 commit comments

Comments
 (0)