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 authored and GitHub committed 2025-03-18 19:24:24 +05:30
1 parent 0f0d94ab4a
commit 74fcc0bfcd
1 file changed
+1 -1
+1 -1
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>> {