Repository navigation
Add pseudo code to compress*/expand* docs - #412
Conversation
|
I remember it being confusing and asking for doctests, but I guess it was never addressed and I overlooked it in the review. My bad! I don't think the pseudocode is any more succinct than regular Rust. It adds the separate I think I'd like to see doctests/examples instead, because that's how std documents its functions and it's good to be consistent. If you feel doctests alone don't explain it, we can have both usage examples and an explanation of what this does in actual Rust. |
|
Thank you for flagging this issue and for opening a PR, this should have been better documented from the start and it's my fault it wasn't done in the original PR. |
|
I made the pseudo code Rust as requested. (Not that anything of substance changed.)
This would be the first doctest of that kind. I don't intend to break that ground. |
|
Fair enough about doctests. I messed around with them in #268 but didn't end up merging that and it might not be the best approach anyway. Thank you! |
I couldn't understand what
compress*andexpand*were doing from their docs. (TBH, they had the kind of description that you only understand if you already know what it's doing.) So I added the algorithm these methods perform as pseudo code to the docs.I opted for python-like pseudo code to save 2 lines of just closing braces.