This repository has been archived by the owner on Feb 18, 2024. It is now read-only.
FileReader
doesn't own underlying reader
?
#514
Labels
enhancement
An improvement to an existing feature
no-changelog
Issues whose changes are covered by a PR and thus should not be shown in the changelog
Hi there!
Is there a reason
FileReader
doesn't own the underlyingreader
?StreamReader
owns its underlying reader, and as of 0.6.0,FileWriter
now owns its underlying writer as well.I've been trying to work with
FileReader
s, and have been having trouble with it taking a&'a mut R
instead of justR
. This makes it hard if I want to store aFileReader
in another struct to make multiple calls to the underlying iterator without fighting the borrow checker. For now, I'm using aStreamReader
instead, with a file to work around the issue, but StreamReaders seem to have slightly different semantics.Would it be better for these IO interfaces to consistently take ownership of their underlying readers and writers? Would ya'll accept a patch if so? Happy to post some more concrete examples if that would help!
Thanks for arrow2! It's really been a pleasure to work with so far!
The text was updated successfully, but these errors were encountered: