File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed
Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -108,6 +108,12 @@ impl From<String> for Interned {
108108 }
109109}
110110
111+ impl From < & String > for Interned {
112+ fn from ( value : & String ) -> Self {
113+ value. as_bytes ( ) . into ( )
114+ }
115+ }
116+
111117impl From < & OsStr > for Interned {
112118 fn from ( value : & OsStr ) -> Self {
113119 value. as_encoded_bytes ( ) . into ( )
@@ -120,6 +126,12 @@ impl From<OsString> for Interned {
120126 }
121127}
122128
129+ impl From < & OsString > for Interned {
130+ fn from ( value : & OsString ) -> Self {
131+ value. as_encoded_bytes ( ) . into ( )
132+ }
133+ }
134+
123135impl From < & Path > for Interned {
124136 fn from ( value : & Path ) -> Self {
125137 value. as_os_str ( ) . into ( )
@@ -132,6 +144,12 @@ impl From<PathBuf> for Interned {
132144 }
133145}
134146
147+ impl From < & PathBuf > for Interned {
148+ fn from ( value : & PathBuf ) -> Self {
149+ value. as_os_str ( ) . into ( )
150+ }
151+ }
152+
135153impl Borrow < BorrowedInterned > for Interned {
136154 fn borrow ( & self ) -> & BorrowedInterned {
137155 self . deref ( )
You can’t perform that action at this time.
0 commit comments