rust-scraper / ego-tree

Vec-backed ID-tree
https://docs.rs/ego-tree
ISC License
45 stars 16 forks source link

Implement serde traits for ego-tree #34

Closed LoZack19 closed 1 month ago

LoZack19 commented 1 month ago

Solves https://github.com/rust-scraper/ego-tree/issues/21

I encapsulated everything inside the serde module. I implemented manually Serialize and Deseriaize for

Needs a review focused on security, and maybe more tests.

cfvescovo commented 1 month ago

I will perform a more thorough review ASAP tomorrow morning

LoZack19 commented 1 month ago

Since it doesn't look that this will be merged any time soon, I'll convert this to a draft

LoZack19 commented 1 month ago

I addressed the various issues that had been pointed out to me. All that is missing are more serious tests with serde_test. In particular, I created two auxiliary representations to serialize and deserialize data. The tree is forced to go through these representations, which should protect the output from invariant violations. Check out weather you like it, and feel free to point out new issues.

cfvescovo commented 1 month ago

LGTM, merging now