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 {
198
198
const PATH_SEP_MAIN : & str = std:: path:: MAIN_SEPARATOR_STR ;
199
199
200
200
pub ( crate ) fn encode ( & self ) -> String {
201
+ let mut buf = self . kind . to_string ( ) ;
202
+ buf. push ( ':' ) ;
201
203
// Lossy conversion is safe here because we assume that `path` comes from
202
204
// `ComponentPart::decode()`, i.e. from calling `Path::from()` on a `&str`.
203
205
let mut path = self . path . to_string_lossy ( ) ;
204
206
if Self :: PATH_SEP_MAIN != Self :: PATH_SEP_MANIFEST {
205
207
path = Cow :: Owned ( path. replace ( Self :: PATH_SEP_MAIN , Self :: PATH_SEP_MANIFEST ) ) ;
206
208
} ;
207
- format ! ( "{}:{path}" , self . kind)
209
+ buf. push_str ( & path) ;
210
+ buf
208
211
}
209
212
210
213
pub ( crate ) fn decode ( line : & str ) -> Option < Self > {
You can’t perform that action at this time.
0 commit comments