Extract table from details and grid_details
This commit extracts the common table element from the details and grid_details modules, and makes it its own reusable thing. - A Table no longer holds the values it’s rendering; it just holds a continually-updated version of the maximum widths for each column. This means that all of the resulting values that turn into Rows — which here are either files, or file eggs — need to be stored *somewhere*, and that somewhere is a secondary vector that gets passed around and modified alongside the Table. - Likewise, all the mutable methods that were on Table that added a Row now *return* the row that would have been added, hoping that the row does get stored somewhere. (It does, don’t worry.) - Because rendering with mock users is tested in the user-field-rendering module, we don’t need to bother threading different types of U through the Environment, so now it’s just been specialised to UsersCache. - Accidentally speed up printing a table by not buffering its entire output first when not necessary.
Showing
此差异已折叠。
src/output/table.rs
0 → 100644
想要评论请 注册 或 登录