File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,8 @@ and running `taplo fmt --check` and `taplo check`.
2727
2828We also include several other checks to ensure integrity:
2929
30+ - The key orderings in a TOML file must match the the ordering of ` properties ` in the corresponding schema file.
31+
3032- The ` github-username ` field for contributors must match the filename.
3133
3234- The ` slug ` field for teams must match the filename.
Original file line number Diff line number Diff line change @@ -26,9 +26,7 @@ pub fn load_from_dir<T: DeserializeOwned + Debug + HasKeyOrder>(
2626 // Calculate the key order for the item.
2727 let mut item: T = toml:: from_str ( & content)
2828 . with_context ( || format ! ( "Failed to parse {} file: {}" , item_name, path. display( ) ) ) ?;
29-
30- // Parse into IndexMap to get key order.
31- let index_map: IndexMap < String , Value > = from_str ( & content) ?;
29+ let index_map: IndexMap < String , Value > = from_str ( & content) ?; // Parse into IndexMap to get key order.
3230 let key_order: Vec < String > = index_map. keys ( ) . cloned ( ) . collect ( ) ;
3331 item. set_key_order ( key_order) ;
3432
You can’t perform that action at this time.
0 commit comments