Closed MaxJohansen closed 4 years ago
Thank you very much for your contribution!
From a first glance, the changes look great, but I didn't have the time for a full review yet. Could be a few more days.
I'm going to close this for now, with #88 merged. Happy to reopen it if there is any further comments/progress.
I have tried to implement the syntax suggested in the discussion on issue #16.
I did not add support for negative offsets simply because I do not see a simple way to implement it for
Stdin
. If required, I suppose it could be implemented with a buffering solution that readsM - N
bytes into a buffer until it reaches the end ofStdin
before passing it to a reader.My solution differs from #43 by not modifying the Printer itself, merely the Reader that it receives. This means that it works just as well for
Stdin
as for a file. A consequence of this is that the bytes are no longer automatically "aligned" in the output, but that just might be what you want in this situation.This is my first contribution of Rust code and I welcome suggestions that can help me improve! :)