Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
improve
IndexMap
's Debug print (#1610)
I was debugging an `IndexMap`, and I found the debug print to be difficult to use. It didn't print out the keys for the map, and was overly whitespace-heavy. I made this modification for my own debugging, and thought it might be a good update to push upstream. Before: ``` IndexMap { values: [ ( 1, Item( ItemId { package: None, item: LocalItemId( 0, ), }, Available, Imported, ), ), ( 5, Item( ItemId { package: None, item: LocalItemId( 1, ), }, Available, Debug( 10, ), ), ), ( 8, PrimTy( Int, ), ), ( 15, Item( ItemId { package: None, item: LocalItemId( 1, ), }, Available, Debug( 10, ), ), ), ... etc ``` After: ``` IndexMap { values: [ "1: Item(ItemId { package: None, item: LocalItemId(0) }, Available, Imported)", "5: Item(ItemId { package: None, item: LocalItemId(1) }, Available, Debug(10))", "8: PrimTy(Int)", "15: Item(ItemId { package: None, item: LocalItemId(1) }, Available, Debug(10))", "16: Item(ItemId { package: None, item: LocalItemId(1) }, Available, Debug(10))", ], } ``` No `expect-test` stuff relies on this print, so it is a pretty isolated change.
- Loading branch information