summaryrefslogtreecommitdiffstats
path: root/src/output/render/size.rs
AgeCommit message (Collapse)Author
2023-02-24Grab bag of miscellaneous fixesVictor Song
2021-08-14fix whitespacea1346054
2021-04-06Use thousand separators again and fix alignement when it’s not ASCIIariasuni
2021-03-27Fix a rounding error in human readable filesizesariasuni
2020-10-10Batch source formattingBenjamin Sago
I read through every file and applied a couple of rustfmt suggestions. The brace placement and alignment of items on similar lines has been made consistent, even if neither are rustfmt's default style (a file has been put in place to enforce this). Other changes are: • Alphabetical imports and modules • Comma placement at the end of match blocks • Use newlines and indentation judiciously • Spaces around associated types • Spaces after negations (it makes it more clear imho) • Comment formatting • Use early-returns and Optional `?` where appropriate
2020-10-10Various misc clippy fixesBenjamin Sago
2020-10-10Better referencingBenjamin Sago
This commit makes changes to the way variables are referenced: • Make types Copy when possible • Make methods take `self` instead of `&self` where possible (trivially_copy_pass_by_ref) • Remove unnecessary borrowing (needless_ref) • Remove unnecessary cloning (clone_on_copy) • Remove `ref` from match arms where possible (new Rust match ergonomics)
2020-10-10The SelfeningBenjamin Sago
This commit uses Clippy to fix all the 'use_self' warnings. Using Self instead of the type name has been good Rust style for a while now, and it's become the style I'm used to seeing.
2020-10-10Mass version upgradeBenjamin Sago
This upgrades the versions of everything, including upgrading almost all outdated dependencies. • number_prefix had some backwards-incompatible changes. It now feels more Rustful, and spells "Mebi" correctly. • term_grid stopped working when I upgraded it, worryingly, so I reverted it back.
2020-01-19Merge branch 'master' into customize-size-scale-coloursBenjamin Sago
2019-11-17Allow customizing size scale colours.Maarten de Vries
Also adjust the selection of the colour depending on the scale used. * With decimal prefixes colours change on powers of 1000. * With binary or no prefixes colours change on powers of 1024.
2019-07-19Update to Rust 2018Bond_009
2019-04-16Fix usages of number_prefixBernardo Meurer
2018-06-19fix most clippy warningsThibaut Brandscheid
2017-08-26\t and \s+$Benjamin Sago
2017-08-20Reverse what knows how to render a cellBenjamin Sago
This commit adds many traits, all named ‘Colours’, to the code. Each one asks for a colour needed to render a cell: the number of links asks for colours for the number and the multi-link-file special case; the file size asks for number, unit, punctuation, and device ID colours, or it can do a scale with its own colours, however it wants. This is a step towards LS_COLORS compatibility, believe it or not. If a text cell in a column doesn’t depend on Colours to render itself, then the source of the colours is open-ended. I am glad to have not needed any test changes here.
2017-08-20\tBenjamin Sago
2017-07-05Rename Columns to table::OptionsBenjamin Sago
The views have been renamed to be the Optionses of their module; now the options for the Table — Columns — has followed suit. This works out, because the table module depended on everything in the columns module. It opens the door for other only-table-specific things to be included. The casualty was that by making it non-Clone and non-PartialEq, a bunch of other #[derive]-d types had to have their derivions removed too.
2017-06-24Move Colour and Classify to the ViewBenjamin Sago
All four view types — lines, grid, details, and grid-details — held their own colours and classify flags. This didn’t make any sense for the grid-details view, which had to pick which one to use: the values were in there twice. It also gave the Table in the details view access to more information than it really should have had. Now, those two flags are returned separately from the view “mode”, which is the new term for one of those four things.
2017-05-21Add unit tests for size renderingBenjamin Sago
2017-05-20Make DeviceIDs its own typeBenjamin Sago
This is so we can define a render method on it.
2017-05-20Put all the rendering functions into their own moduleBenjamin Sago