Simple_line, a fast&secure alternative to std::io::BufReader::

I'm about to release my first version of simple_line, a crate to iterate over lines of a std::io::Read. But wait: This is what std::io::BufReader does which is part of the standard library. I've also written about why I did so.
https://github.com/mineichen/simple_lines/blob/main/devto.md

I'd very much appreciate if anyone could find some time to review the article and give me feedback about it and the library before I release it as my first article on dev.to and first library to crates.io. Best thanks in advance

A lending iterator is in fact the motivating example of RFC 1598 (GATs).

Don't get confused by the name in the example; the proposed async Streams are something else. However, there is a discussion in that RFC about how lending and non-lending Streams may interact, and some coherence issues around it. The same considerations apply to lending and non-lending Iterators. (TLDR: you can blanket impl the lending version for the non-lending version, but not without coherence hurdles.)

Sorry for my delay. I complemented my post with your notes and referred to you in my final version on Writing a better Line Iterator in Rust - DEV Community 👩‍💻👨‍💻. Thank you very much for your participation!

1 Like

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.