14 Commits

Author SHA1 Message Date
Tobias Schmitz
0ed6b31b70
refactor: implement TryFrom<&Bytes> for Lines
- remove Bytes::load_str and impl From<Utf8Error> for LoadError
2025-06-10 13:47:41 +02:00
Tobias Schmitz
2d3e883d2b
refactor: apply some suggestions
- rename Loaded::bytes to data
- change `let data = source.load()` to `let loaded`
- only expose a single `within` method for the LoadedWithin trait
    - invalid utf-8 data is a rare edge case
- only store one EcoString inside LoadError
    - mutate it when using `LoadedWithin::within` method
2025-06-10 13:47:41 +02:00
Tobias Schmitz
1c08683248
feat: print path of external file if it isn't valid utf-8 2025-06-10 13:47:41 +02:00
Tobias Schmitz
8e9e8a753c
docs: update some comments 2025-06-10 13:47:41 +02:00
Tobias Schmitz
80491a459c
docs: update some comments 2025-06-10 13:47:41 +02:00
Tobias Schmitz
fc9697fd46
perf: reduce size of LoadError 2025-06-10 13:47:41 +02:00
Tobias Schmitz
1c4eea8353
feat: use LoadError to avoid polluting memoization with callsite spans and file ids 2025-06-10 13:47:41 +02:00
Tobias Schmitz
23f1c86b84
feat: try to report line and column in files that contain invalid utf-8 2025-06-10 13:47:41 +02:00
Tobias Schmitz
e5d8f02554
refactor: factor out a general Lines struct from Source 2025-06-10 13:47:41 +02:00
Tobias Schmitz
2e2f646f2a
refactor: Loaded err_at to err_in_text 2025-06-10 13:47:41 +02:00
Tobias Schmitz
a79120b668
refactor: rename Data to Loaded 2025-06-10 13:47:41 +02:00
Tobias Schmitz
7e6c3b4159
feat: show external error messages in csv, json, toml, xml, yaml, and syntax/theme files 2025-06-10 13:47:41 +02:00
Laurenz
50ccd7d60f
Scope deprecations (#5798) 2025-02-04 09:38:31 +00:00
Laurenz
be7cfc85d0
Split out four new crates (#5302) 2024-10-27 18:04:55 +00:00