Commit Graph
220 Commits
Author SHA1 Message Date
mdecimus b0ba8dba3b Clippy fix 2025-02-27 17:24:43 +01:00
sftse 60fe70d2c5 fix: express custom trait with stdlib traits (#101) 2025-02-09 15:53:53 +01:00
sftse 209778f080 Informing callers of buffering requirements prevents accidental double buffering (#100) 2025-02-09 15:52:22 +01:00
mdecimus 0bcf5f513c v0.10.2 2025-01-28 18:26:37 +01:00
mdecimus 3e300dd2c2 Fixed Headername::parse 2025-01-26 16:07:18 +01:00
mdecimus c177ffaca3 v0.10.0 v0.10.0 2025-01-26 15:31:53 +01:00
mdecimus fa34e10927 Moved HTML entity mappings to hashify large map 2025-01-26 10:18:46 +01:00
mdecimus 2b37017cf8 Fixed OOB 2025-01-25 18:15:29 +01:00
mdecimus 5f25e1291f REUSE licensing 2025-01-25 17:47:39 +01:00
mdecimus 8b2ad20bf3 Hashing with hashify + cosmetic fixes 2025-01-25 17:45:23 +01:00
sftse bc6a5b1e94 Retain mbox IO errors (#91)
* 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
2025-01-25 15:17:32 +01:00
sftse 20fa3dbd46 Fix deserialize (#93)
* Expand test to cover deserialization

* Fix deserialization
2025-01-25 15:15:10 +01:00
sftse e97d14ad89 Add .eml example with odd behavior (#88)
* Add .eml example with odd behavior

* Parse malformed, non-multipart, single text/plain messages best-effort as if text is not malformed
2025-01-25 15:14:19 +01:00
sftse ed16429bcc Hide concrete type behind impl type (#94)
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.
2025-01-25 15:12:27 +01:00
sftse c733600b75 Obsolete timezones (#95)
* 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
2025-01-25 15:11:41 +01:00
sftse 76669a32c6 Folding ws between "Content-Type:" and "plain/text" leads to empty header (#96)
* Add testcase with folding whitespace between "Content-Type:" and "text/plain"

* Fix handling of newlines between Content-Type and the type itself
2025-01-25 15:10:27 +01:00
mdecimus c8bf355494 Multiline quoted continuations (closes #92) 2024-12-01 20:54:09 +13:00
mdecimus 9bf766dcf1 Clippy fixes 2024-12-01 20:18:17 +13:00
George 0eba00b4e9 Update lib.rs (#75)
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
2024-10-21 17:22:28 +02:00
sftse 0baffddb28 Minor fixes (#87)
* 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
2024-10-21 17:21:56 +02:00
董彬 54ca7df6eb Update multi_byte.rs (#86)
Under some extreme circumstances, the pre-allocated length might not be sufficient.
2024-09-08 18:18:48 +02:00
mdecimus c3f28cb4d1 v0.9.4 2024-09-04 09:10:33 +02:00
mdecimus e512a66bb0 More flexible charset name parsing (closes #85) 2024-08-30 17:04:00 +02:00
mdecimus 6a48ed69b6 Removed FUNDING 2024-08-09 18:28:23 +02:00
mdecimus dfda00c939 Fix nestead attachment contents and len functions (fixes #84) 2024-08-09 18:27:09 +02:00
mdecimus a96497d7a3 v0.9.3 2024-03-28 15:46:25 +01:00
Clément DOUIN ad4dff69c3 fix address name containing @ (#80) 2024-03-14 13:29:37 +01:00
Arif Driessen cf87d3556c initial commit (#77) 2024-02-07 13:48:28 +01:00
Mauro D 4ff4c57e2c Clippy fixes 2024-01-08 19:31:34 +01:00
Mauro D 598cba3b87 Added liberapay 2024-01-08 19:23:59 +01:00
sftse 716c0d747e correctly parse obsolete years as in RFC5322 section 4.3 (#72) 2024-01-05 18:28:36 +01:00
mdecimus 65533d3faf v0.9.2 v0.9.2 2023-11-27 09:34:59 +01:00
mdecimus 28a9b67b9a Fix Received struct serialization for bincode compatibility 2023-11-09 17:40:47 +01:00
mdecimus b6c080ff45 Updaded keywords v0.9.1 2023-09-22 13:39:53 +02:00
mdecimus 56d2c3b8b0 v0.9.1 2023-09-22 13:38:55 +02:00
mdecimus 816d944f2e Updated Rust version 2023-09-16 17:28:58 +02:00
mdecimus e5a4e65112 v0.9.0 v0.9.0 2023-09-05 18:11:49 +02:00
mdecimus b0a5925eac v0.9.0 2023-09-05 11:07:39 +02:00
mdecimus 4b5455c196 MessageParser builder 2023-09-05 10:54:39 +02:00
mdecimus ec04c1412d Merged RfcHeader into HeaderName 2023-09-04 19:48:47 +02:00
mdecimus e230000856 Moved address related object to Address enum 2023-09-04 18:27:15 +02:00
mdecimus 8e5381f60b Project reorganization 2023-09-04 15:23:45 +02:00
mdecimus 5a7b50059f Received header parser 2023-09-03 20:49:20 +02:00
mdecimus 7c08078617 Into_owned returns static lifetime 2023-09-01 09:01:29 +02:00
mdecimus da62659eb6 Support for trailing whitespaces in quoted printable MIME encoded parts. 2023-07-03 11:05:03 +02:00
mdecimus 405b742be2 Support for trailing whitespaces in quoted printable MIME encoded parts. 2023-07-03 10:42:33 +02:00
mdecimus 743aacafad Support for trailing whitespaces in quoted printable MIME encoded parts. 2023-07-03 10:17:26 +02:00
mdecimus ffb5a7fd61 Added header_as function 2023-07-03 09:14:24 +02:00
Geert Stappers 154591697f cargo fmt (#48) 2023-05-14 11:01:14 +02:00
Mauro D c7790a8925 Clippy fixes. 2023-04-12 09:13:48 +00:00