mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
This is a small devex improvement to the rust code generator. Usage of `sorted` in `rustgen.py` was causing the generated code to be completely reshuffled on renames, which made diffs hard to follow. As an example see [this generated file diff](https://github.com/github/codeql/pull/19059/files#diff-c938ba77a3398dd4c633ada5702a03477705c24740a2f7d1e40d4b270d8c3f86). This will make the order deterministically based on the order of definitions in the schema file. This means that renames will find the same place in the generated file, and the place in the generated file will generally be more predictable with respect to the schema. However, that does mean this change is heavily reshuffling the generated code.