Skip to content

refactor: improve performance, realiability and remove unsafe code#4

Merged
spinualexandru merged 2 commits into
mainfrom
refactor/performance-and-reliability
Nov 28, 2025
Merged

refactor: improve performance, realiability and remove unsafe code#4
spinualexandru merged 2 commits into
mainfrom
refactor/performance-and-reliability

Conversation

@spinualexandru
Copy link
Copy Markdown
Owner

Changes:
Removed unsafe code:

  • MutableCategoryInstance no longer holds document reference
  • Clean borrow checker compliance without raw pointers

Clone reduction

  • use std::mem::take in config.rs instead of .clone() for error collection

Misc

  • Added strip_prefix/strip_suffix instead of manual slicing
  • Added HandlerFn type alias for complex handler functin type

Tests:
Added edge case tests for:

  • Color parsing: invalid hex, wrong length, out of rang values, malformed syntax
  • Vec2 parsing: non numeric, missing components, whitespace, negative, floats
  • General: Empty values, unicode, special chars
    Round trip serialization tests:
  • All types round trip (vars, values, handles, special cats)
  • Handler removal with document sync verification
  • Special category removal with doc sync verification
  • Nested categories round-trip

@spinualexandru spinualexandru merged commit d1d8ee5 into main Nov 28, 2025
3 checks passed
@spinualexandru spinualexandru deleted the refactor/performance-and-reliability branch November 28, 2025 22:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant