@@ -158,25 +158,27 @@ fn check_version(config: &Config) -> Option<String> {
158
158
159
159
let changes = find_recent_config_change_ids ( id) ;
160
160
161
- if !changes. is_empty ( ) {
162
- msg. push_str ( "There have been changes to x.py since you last updated:\n " ) ;
163
-
164
- for change in changes {
165
- msg. push_str ( & format ! ( " [{}] {}\n " , change. severity. to_string( ) , change. summary) ) ;
166
- msg. push_str ( & format ! (
167
- " - PR Link https://github.com/rust-lang/rust/pull/{}\n " ,
168
- change. change_id
169
- ) ) ;
170
- }
161
+ if changes. is_empty ( ) {
162
+ return None ;
163
+ }
164
+
165
+ msg. push_str ( "There have been changes to x.py since you last updated:\n " ) ;
171
166
172
- msg. push_str ( "NOTE: to silence this warning, " ) ;
167
+ for change in changes {
168
+ msg. push_str ( & format ! ( " [{}] {}\n " , change. severity. to_string( ) , change. summary) ) ;
173
169
msg. push_str ( & format ! (
174
- "update `config.toml` to use `change-id = {latest_change_id}` instead"
170
+ " - PR Link https://github.com/rust-lang/rust/pull/{}\n " ,
171
+ change. change_id
175
172
) ) ;
173
+ }
176
174
177
- if io:: stdout ( ) . is_terminal ( ) && !config. dry_run ( ) {
178
- t ! ( fs:: write( warned_id_path, latest_change_id. to_string( ) ) ) ;
179
- }
175
+ msg. push_str ( "NOTE: to silence this warning, " ) ;
176
+ msg. push_str ( & format ! (
177
+ "update `config.toml` to use `change-id = {latest_change_id}` instead"
178
+ ) ) ;
179
+
180
+ if io:: stdout ( ) . is_terminal ( ) && !config. dry_run ( ) {
181
+ t ! ( fs:: write( warned_id_path, latest_change_id. to_string( ) ) ) ;
180
182
}
181
183
} else {
182
184
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