Commit 1c570fa
committed
refactor: Migrate replace_with_links to use Rust convenience function
Use load_thesaurus_from_json_and_replace() instead of manually loading
thesaurus and calling replace_matches(). This is cleaner, more efficient,
and aligns with the Rust API design.
Benefits:
- Reduced code duplication
- Single source of truth for load-and-replace logic
- Better alignment with Rust crate API
- Slightly improved performance (one less allocation)1 parent 718f33c commit 1c570fa
1 file changed
Lines changed: 4 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
297 | 297 | | |
298 | 298 | | |
299 | 299 | | |
300 | | - | |
301 | | - | |
302 | | - | |
303 | 300 | | |
304 | 301 | | |
305 | 302 | | |
| |||
313 | 310 | | |
314 | 311 | | |
315 | 312 | | |
316 | | - | |
| 313 | + | |
| 314 | + | |
317 | 315 | | |
318 | 316 | | |
319 | 317 | | |
| |||
0 commit comments