@@ -149,25 +149,27 @@ fn check_version(config: &Config) -> Option<String> {
149
149
150
150
let changes = find_recent_config_change_ids ( id) ;
151
151
152
- if !changes. is_empty ( ) {
153
- msg. push_str ( "There have been changes to x.py since you last updated:\n " ) ;
154
-
155
- for change in changes {
156
- msg. push_str ( & format ! ( " [{}] {}\n " , change. severity. to_string( ) , change. summary) ) ;
157
- msg. push_str ( & format ! (
158
- " - PR Link https://github.com/rust-lang/rust/pull/{}\n " ,
159
- change. change_id
160
- ) ) ;
161
- }
152
+ if changes. is_empty ( ) {
153
+ return None ;
154
+ }
155
+
156
+ msg. push_str ( "There have been changes to x.py since you last updated:\n " ) ;
162
157
163
- msg. push_str ( "NOTE: to silence this warning, " ) ;
158
+ for change in changes {
159
+ msg. push_str ( & format ! ( " [{}] {}\n " , change. severity. to_string( ) , change. summary) ) ;
164
160
msg. push_str ( & format ! (
165
- "update `config.toml` to use `change-id = {latest_change_id}` instead"
161
+ " - PR Link https://github.com/rust-lang/rust/pull/{}\n " ,
162
+ change. change_id
166
163
) ) ;
164
+ }
167
165
168
- if io:: stdout ( ) . is_terminal ( ) && !config. dry_run ( ) {
169
- t ! ( fs:: write( warned_id_path, latest_change_id. to_string( ) ) ) ;
170
- }
166
+ msg. push_str ( "NOTE: to silence this warning, " ) ;
167
+ msg. push_str ( & format ! (
168
+ "update `config.toml` to use `change-id = {latest_change_id}` instead"
169
+ ) ) ;
170
+
171
+ if io:: stdout ( ) . is_terminal ( ) && !config. dry_run ( ) {
172
+ t ! ( fs:: write( warned_id_path, latest_change_id. to_string( ) ) ) ;
171
173
}
172
174
} else {
173
175
msg. push_str ( "WARNING: The `change-id` is missing in the `config.toml`. This means that you will not be able to track the major changes made to the bootstrap configurations.\n " ) ;
0 commit comments