refactor: streaming core optimization and code deduplication

- Remove 'wide' and 'simd_utils.rs', rely on compiler auto-vectorization.
- Deduplicate swap parsing in 'types.rs' and 'merger_event.rs' using generic traits and local macros.
- Improve signature cleanup in 'global_state.rs' to avoid large heap allocations.
- Replace manual metadata accessors in 'traits.rs' with a macro for all variants.
- Remove unused types (ParseResult, ProtocolInfo) and legacy commented code.
- Fix Clippy lints (is_empty, copied) and restore missing trait imports.
This commit is contained in:
Estereg
2026-03-07 07:16:30 +00:00
parent 0c369e23a8
commit 6493f9d922
9 changed files with 301 additions and 929 deletions
+2 -2
View File
@@ -58,14 +58,14 @@ pub fn read_u8_le(data: &[u8], offset: usize) -> Option<u8> {
}
pub fn read_option_bool(data: &[u8], offset: &mut usize) -> Option<Option<bool>> {
let has_value = data.get(*offset)?.clone();
let has_value = data.get(*offset).copied()?;
*offset += 1;
if has_value == 0 {
return Some(None);
}
let value = data.get(*offset)?.clone();
let value = data.get(*offset).copied()?;
*offset += 1;
Some(Some(value != 0))