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_(
1043
1043
download. process ,
1044
1044
)
1045
1045
. await ;
1046
+
1046
1047
// 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
+ } ) ;
1054
1053
}
1055
1054
}
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
1063
1057
}
1064
1058
1065
1059
pub ( crate ) async fn dl_v2_manifest (
You can’t perform that action at this time.
0 commit comments