You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems like a common pattern in the codebase is to use run_command_and_read_response, and then parse its output. However, read_response already fully parses the response, its just that the results of the parsing seems to be discarded https://github.com/mattnenterprise/rust-imap/blob/master/src/client.rs#L521.
Assuming my reading of the code is correct, is there a reason it's laid out like this, as opposed to read_response returning a Vec of the parsed responses or similar?
The text was updated successfully, but these errors were encountered:
You are completely correct. This is an artifact of me wanting to make the changes as small as possible in #58 (which was already a pretty major change). That code could definitely be cleaned up significantly, and be made more efficient in the process.
I'm hoping that I'll have time at some point over the summer to do some deeper cleanup of rust-imap, including things like this, though if you want to give it a go, I'd be happy to review a PR! I'm also partially waiting on #69, without which I have relatively little power to plan and make new releases :)
Understood! Thanks for the very quick response. If I run into serious performance issues I may take a shot at refactoring it, but that hasn't happened yet. :-)
It seems like a common pattern in the codebase is to use
run_command_and_read_response
, and then parse its output. However,read_response
already fully parses the response, its just that the results of the parsing seems to be discarded https://github.com/mattnenterprise/rust-imap/blob/master/src/client.rs#L521.Assuming my reading of the code is correct, is there a reason it's laid out like this, as opposed to read_response returning a Vec of the parsed responses or similar?
The text was updated successfully, but these errors were encountered: