Closed mlgiraud closed 3 weeks ago
Maybe it would also make sense to return a type that implements the Error
trait, instead of something that just implements Debug
?
Another question maybe: Why does the fetch function have to take a mutable reference to self? Shouldn't this be an immutable function?
EDIT: This makes it practically impossible to have the parser borrow data from an input cache, and also pass the input cache to the write function for the error report, since this would require a mutable borrow of the input cache, when the input cache is already borrowed read only for the parsed data.
@zesterer Any updates on this?
Thanks for the PR. Sorry, it got lost in my notifications. I think this is a positive change, although I'm surprised it's been stable for so long already: I'm used to things like this being nightly-only for a while!
Just a small PR to replace Box<dyn ...> with RPITIT, since it is now stable. I believe this is what your todo in the trait was for?