Skip to content

Commit

Permalink
[ISSUE #13]Optimize impl From<&'static str> for CheetahString (#14)
Browse files Browse the repository at this point in the history
* [ISSUE #13]Optimize impl From<&'static str> for CheetahString

* fix code style
  • Loading branch information
mxsm authored Nov 7, 2024
1 parent 6eea5b5 commit 2105eab
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/cheetah_string.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ impl From<Arc<String>> for CheetahString {
}
}

impl From<&'static str> for CheetahString {
fn from(s: &'static str) -> Self {
CheetahString::from_static_str(s)
impl<'a> From<&'a str> for CheetahString {
fn from(s: &'a str) -> Self {
CheetahString::from_slice(s)
}
}

Expand Down

0 comments on commit 2105eab

Please sign in to comment.