Repository navigation
refactor: Replace Once with now stable OnceLock - #259
Conversation
|
It will be hard for me to merge/rebase this to #246 :-/ |
|
Yeah that's fine. I just noticed it while yakshaving for the state machines implentation. I'll keep the PR open and it can rebase on whatever we plan to merge. |
81ab833 to
7fbf4dc
Compare
|
@martin-g I've added a commit that changes the default of This is a breaking change, but it is easy for a user to go back to the previous default by calling |
Good! |
7fbf4dc to
beba478
Compare
This refactor splits a unit test into two integration tests as it's no longer possible to overwrite `SERDE_HUMAN_READABLE` after it has been set. By splitting it into two integration tests, they don't share global state and can thus modify it for the test. I've also removed the unit tests that test that the `Serializer`/ `Deserializer` correctly use `SERDE_HUMAN_READABLE` for their `is_human_readable` implementation as these structs are not accessible from a integration test. I've kept the half of the tests that test for `SERDE_HUMAN_READABLE == true`. If this implementation is ever changed it will also affect the integration tests so it's still being tested.
beba478 to
55f0dfc
Compare
This refactor splits a unit test into two integration tests as it's no longer possible to overwrite
SERDE_HUMAN_READABLEafter it has been set. By splitting it into two integration tests, they don't share global state and can thus modify it for the test.I've also removed the unit tests that test that the
Serializer/Deserializercorrectly useSERDE_HUMAN_READABLEfor theiris_human_readableimplementation as these structs are not accessible from a integration test. I've kept the half of the tests that test forSERDE_HUMAN_READABLE == true. If this implementation is ever changed it will also affect the integration tests so it's still being tested.Closes #253