migrator: Fix case where users see migration banner despite no diff changes (#26982)

Fixes edge case where after carrying out all migrations if final text is
same as existing text, we don't need to ask user to do anything, despite
migrations edits are being applied internally. E.g. A -> B - > C -> A

Release Notes:

- N/A
This commit is contained in:
Smit Barmase 2025-03-18 19:24:24 +05:30 committed by GitHub
parent a9f7c0549c
commit 4b775505f5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -77,7 +77,7 @@ fn run_migrations(
result = Some(migrated_text);
}
}
Ok(result)
Ok(result.filter(|new_text| text != new_text))
}
pub fn migrate_keymap(text: &str) -> Result<Option<String>> {