Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This commit improves the layout table printing by removing the empty gap at the end of a row for non-single element rows. This means that previously the layout table would print for a struct like this: ```rs \#layout_of Boon := enum( Foo(x: i32, y: i32), Faz(z: f64), ); ``` Before: ``` info: Layout of `Boon` (size=16b align=8b): ┌──────────────┬─────────────────────────┐ │ 4b tag (u32) │ │ ├──────────────┼────────────┬────────────┤ │ Foo │ x: i32 │ y: i32 │ │ │ │ │ │ 0 │ size: 4b │ size: 4b │ │ │ offset: 4b │ offset: 8b │ │ │ align: 4b │ align: 4b │ ├──────────────┼────────┬───┴────────┬───┤ │ Faz │ 4b pad │ z: f64 │ │ │ │ │ │ │ │ 1 │ ## │ size: 8b │ │ │ │ ## │ offset: 8b │ │ │ │ ## │ align: 8b │ │ └──────────────┴────────┴────────────┴───┘ ``` After the change, we now print the following: ``` info: Layout of `Boon` (size=16b align=8b): ┌──────────────┬─────────────────────────┐ │ 4b tag (u32) │ │ ├──────────────┼────────────┬────────────┤ │ Foo │ x: i32 │ y: i32 │ │ │ │ │ │ 0 │ size: 4b │ size: 4b │ │ │ offset: 4b │ offset: 8b │ │ │ align: 4b │ align: 4b │ ├──────────────┼────────┬───┴────────────┤ │ Faz │ 4b pad │ z: f64 │ │ │ │ │ │ 1 │ ## │ size: 8b │ │ │ ## │ offset: 8b │ │ │ ## │ align: 8b │ └──────────────┴────────┴────────────────┘ ```
- Loading branch information