File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -198,13 +198,16 @@ impl ComponentPart {
198198 const PATH_SEP_MAIN : & str = std:: path:: MAIN_SEPARATOR_STR ;
199199
200200 pub ( crate ) fn encode ( & self ) -> String {
201+ let mut buf = self . kind . to_string ( ) ;
202+ buf. push ( ':' ) ;
201203 // Lossy conversion is safe here because we assume that `path` comes from
202204 // `ComponentPart::decode()`, i.e. from calling `Path::from()` on a `&str`.
203205 let mut path = self . path . to_string_lossy ( ) ;
204206 if Self :: PATH_SEP_MAIN != Self :: PATH_SEP_MANIFEST {
205207 path = Cow :: Owned ( path. replace ( Self :: PATH_SEP_MAIN , Self :: PATH_SEP_MANIFEST ) ) ;
206208 } ;
207- format ! ( "{}:{path}" , self . kind)
209+ buf. push_str ( & path) ;
210+ buf
208211 }
209212
210213 pub ( crate ) fn decode ( line : & str ) -> Option < Self > {
You can’t perform that action at this time.
0 commit comments