Skip to content

Commit

Permalink
Add From<&EcoString> for EcoString impl (#41)
Browse files Browse the repository at this point in the history
  • Loading branch information
idlercloud committed Sep 16, 2024
1 parent 33de214 commit 20c2337
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/string.rs
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,13 @@ impl From<&String> for EcoString {
}
}

impl From<&EcoString> for EcoString {
#[inline]
fn from(s: &EcoString) -> Self {
s.clone()
}
}

impl From<Cow<'_, str>> for EcoString {
#[inline]
fn from(s: Cow<str>) -> Self {
Expand Down

0 comments on commit 20c2337

Please sign in to comment.