We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f94a078 commit ff1665eCopy full SHA for ff1665e
1 file changed
src/string.rs
@@ -69,9 +69,9 @@ impl fmt::Display for IString {
69
}
70
71
72
-impl From<&'static str> for IString {
73
- fn from(s: &'static str) -> IString {
74
- IString::Static(s)
+impl From<&str> for IString {
+ fn from(s: &str) -> IString {
+ IString::Rc(Rc::from(s))
75
76
77
@@ -193,7 +193,7 @@ impl std::borrow::Borrow<str> for IString {
193
impl FromStr for IString {
194
type Err = std::convert::Infallible;
195
fn from_str(value: &str) -> Result<Self, Self::Err> {
196
- Ok(IString::from(String::from(value)))
+ Ok(IString::from(value))
197
198
199
0 commit comments