@@ -1894,7 +1894,7 @@ fn to_dependency_source_id<P: ResolveToPath + Clone>(
1894
1894
name_in_toml : & str ,
1895
1895
manifest_ctx : & mut ManifestContext < ' _ , ' _ > ,
1896
1896
) -> CargoResult < SourceId > {
1897
- let new_source_id = match (
1897
+ match (
1898
1898
orig. git . as_ref ( ) ,
1899
1899
orig. path . as_ref ( ) ,
1900
1900
orig. registry . as_deref ( ) ,
@@ -1945,7 +1945,7 @@ fn to_dependency_source_id<P: ResolveToPath + Clone>(
1945
1945
manifest_ctx. warnings . push ( msg) ;
1946
1946
}
1947
1947
1948
- SourceId :: for_git ( & loc, reference) ?
1948
+ SourceId :: for_git ( & loc, reference)
1949
1949
}
1950
1950
( None , Some ( path) , _, _) => {
1951
1951
let path = path. resolve ( manifest_ctx. gctx ) ;
@@ -1960,20 +1960,18 @@ fn to_dependency_source_id<P: ResolveToPath + Clone>(
1960
1960
if manifest_ctx. source_id . is_path ( ) {
1961
1961
let path = manifest_ctx. root . join ( path) ;
1962
1962
let path = paths:: normalize_path ( & path) ;
1963
- SourceId :: for_path ( & path) ?
1963
+ SourceId :: for_path ( & path)
1964
1964
} else {
1965
- manifest_ctx. source_id
1965
+ Ok ( manifest_ctx. source_id )
1966
1966
}
1967
1967
}
1968
- ( None , None , Some ( registry) , None ) => SourceId :: alt_registry ( manifest_ctx. gctx , registry) ? ,
1968
+ ( None , None , Some ( registry) , None ) => SourceId :: alt_registry ( manifest_ctx. gctx , registry) ,
1969
1969
( None , None , None , Some ( registry_index) ) => {
1970
1970
let url = registry_index. into_url ( ) ?;
1971
- SourceId :: for_registry ( & url) ?
1971
+ SourceId :: for_registry ( & url)
1972
1972
}
1973
- ( None , None , None , None ) => SourceId :: crates_io ( manifest_ctx. gctx ) ?,
1974
- } ;
1975
-
1976
- Ok ( new_source_id)
1973
+ ( None , None , None , None ) => SourceId :: crates_io ( manifest_ctx. gctx ) ,
1974
+ }
1977
1975
}
1978
1976
1979
1977
pub trait ResolveToPath {
0 commit comments