mirror of
https://github.com/thegeneralist01/archivr
synced 2026-12-04 18:56:44 +01:00
When tweet text contains JSON escape sequences (such as newlines \n, escaped quotes \", or unicode escapes), serde_json cannot borrow a &str slice from the input string because unescaping requires allocation. Deserializing to borrowed &str returned an error which caused tweet_metadata_from_json to silently fall back to Default::default(), producing titles like "Thread by @unknown" or "Tweet — @unknown". Using std::borrow::Cow<\x27a, str> allows serde_json to borrow unescaped slices with zero allocation while cleanly allocating for strings with escaped characters. |
||
|---|---|---|
| .. | ||
| archivr-cli | ||
| archivr-core | ||
| archivr-server | ||