File tree Expand file tree Collapse file tree 1 file changed +8
-10
lines changed Expand file tree Collapse file tree 1 file changed +8
-10
lines changed Original file line number Diff line number Diff line change @@ -177,16 +177,14 @@ impl ComponentPart {
177177 }
178178
179179 pub ( crate ) fn decode ( line : & str ) -> Option < Self > {
180- line. find ( ':' ) . map ( |pos| {
181- let mut path_str = Cow :: Borrowed ( & line[ ( pos + 1 ) ..] ) ;
182- if Self :: PATH_SEP_MANIFEST != Self :: PATH_SEP_MAIN {
183- path_str =
184- Cow :: Owned ( path_str. replace ( Self :: PATH_SEP_MANIFEST , Self :: PATH_SEP_MAIN ) ) ;
185- } ;
186- Self {
187- kind : line[ 0 ..pos] . to_owned ( ) ,
188- path : PathBuf :: from ( path_str. as_ref ( ) ) ,
189- }
180+ let pos = line. find ( ':' ) ?;
181+ let mut path_str = Cow :: Borrowed ( & line[ ( pos + 1 ) ..] ) ;
182+ if Self :: PATH_SEP_MANIFEST != Self :: PATH_SEP_MAIN {
183+ path_str = Cow :: Owned ( path_str. replace ( Self :: PATH_SEP_MANIFEST , Self :: PATH_SEP_MAIN ) ) ;
184+ } ;
185+ Some ( Self {
186+ kind : line[ 0 ..pos] . to_owned ( ) ,
187+ path : PathBuf :: from ( path_str. as_ref ( ) ) ,
190188 } )
191189 }
192190}
You can’t perform that action at this time.
0 commit comments