File tree Expand file tree Collapse file tree 1 file changed +8
-14
lines changed Expand file tree Collapse file tree 1 file changed +8
-14
lines changed Original file line number Diff line number Diff line change @@ -1043,23 +1043,17 @@ async fn try_update_from_dist_(
10431043 download. process ,
10441044 )
10451045 . await ;
1046+
10461047 // inspect, determine what context to add, then process afterwards.
1047- let mut download_not_exists = false ;
1048- match & result {
1049- Ok ( _) => ( ) ,
1050- Err ( e) => {
1051- if let Some ( RustupError :: DownloadNotExists { .. } ) = e. downcast_ref :: < RustupError > ( ) {
1052- download_not_exists = true
1053- }
1048+ if let Err ( e) = & result {
1049+ if let Some ( RustupError :: DownloadNotExists { .. } ) = e. downcast_ref :: < RustupError > ( ) {
1050+ return result. with_context ( || {
1051+ format ! ( "could not download nonexistent rust version `{toolchain_str}`" )
1052+ } ) ;
10541053 }
10551054 }
1056- if download_not_exists {
1057- result. with_context ( || {
1058- format ! ( "could not download nonexistent rust version `{toolchain_str}`" )
1059- } )
1060- } else {
1061- result
1062- }
1055+
1056+ result
10631057}
10641058
10651059pub ( crate ) async fn dl_v2_manifest (
You can’t perform that action at this time.
0 commit comments