* fix-no-newline-parse
Dearest Reviewer,
Issue #90 brought up the issue that if there was no newline. the user
provided an easy reproduction case. I was able to track it down to the
parse raw function.
The issue is that the loop hits the end of the string and returns Empty.
However, if there is a start offset then some characters were found. This
code just checks the offset after the loop.
If this is not the correct behavior please close.
Thanks for your time
Becker
* pr feedback
Add break instead of duplicating code.
* fix-fuzz-targets
Dearest Reviewer,
While creating PR #102 I tried running the fuzz command and found it
failing. It looks like the functions were made private and parse headers
arguments were updated.
I dont know if this is a complete update or what is covered but it does
get `cargo +nightly fuzz run mail_parser` working again.
Thanks for your time.
Becker
* readd space
* Simplify
* Clear line buffer explicitly
* Move line clearing outside logic branching
* Switch if-else branch order
* Delete needless branching, other branch early-returns, so this is equivalent
* fmt
* Inline return statement
* Equivalence transform of logic branches
* Equivalence transform of logic branches
* Hoist if across if let
* Delete else block
* Make explicit that !is_from holds implicitly for these branches
* Switch if let {...}; if {...} into if {...}; if let {...}
* Pull out common if check
* Merge common if clauses
* Introduce early continue
* Fixed clippy warnings
* Remove collecting into Vec
* Dont throw away IO error
Without this, the doc(hidden) interacts poorly with the fact that both
BodyPartIterator and AttachmentIterator can be seen in the public api of
other functions. The types still show up, but there's no simple way to know
they implement Iterator or what the Item they return is.
* Expand date time tests by section 4.3 Obsolete Date and Time from RFC5322
* Needless branching
* fmt
* Implement obsolete time zones RFC5322 section 4.3
* Sanity check: constrain hours below 12 and minutes below 60
For ergonomic reasons a default implementation for `DateTime` is useful and all zero's and false is fine, though some specific other value may be more suitable
* Move multipart classification into own closure
* Add classification enum
* Express classification indirectly with an enum
* Express logic clause in equivalent way, add assert inline test to make sure of it
* Remove old classifier
* Remove enum indirection
* Remove closure
* Hoist common if condition into outer scope
* Simplify expression
* Simplify lifetime bounds
A missing lifetime in the GetHeader trait was inferred by lifetime elision rules
to be shorter than necessary, leading to awkward lifetime constraints being
propagated throughout many functions that didnt need them.
* Prohibit Rust 2018 idioms, return longest feasible lifetimes
* Dont duplicate crlf in extension when saving failing results