Commit ee35cfd
refactor: deduplicate util.rs MIME tables and pure functions into vector-core
Delete ~330 lines of duplicate MIME HashMaps (EXT_TO_MIME, MIME_TO_EXT)
and superseded functions from src-tauri/util.rs — re-exported from
vector-core.
Moved to vector-core crypto module:
- format_bytes, is_image_mime, mime_from_extension_safe, mime_from_magic_bytes
Delegated to vector-core:
- calculate_file_hash → vector_core::crypto::sha256_hex
- mime_from_extension_static → vector_core::crypto::mime_from_extension
Kept in src-tauri (Tauri/SIMD deps):
- data_uri (base64_simd), extract_https_urls (simd::url)
- thumbhash generation/decoding (image crate + simd downsampling)
- get_file_type_description (UI display strings)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 978114e commit ee35cfd
2 files changed
Lines changed: 66 additions & 349 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
427 | 427 | | |
428 | 428 | | |
429 | 429 | | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
430 | 481 | | |
431 | 482 | | |
432 | 483 | | |
| |||
0 commit comments