Repository navigation
refactor: split aof.rs and move the keyspace tests out - #421
Merged
Merged
Conversation
aof.rs was about 2,500 lines. AofRecord and its encoding move to aof/record.rs, the tests to aof/tests.rs, and aof/mod.rs keeps the writer, reader and path helpers. No code changed.
keyspace/mod.rs ended with 1,200 lines of tests. They move to keyspace/tests.rs, leaving about 1,500 lines of code in mod.rs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two more long files. Two commits:
ember-persistence/src/aof.rs(about 2,500 lines) becomes a directory:aof/record.rs:AofRecordand its binary encoding, about 1,000 lines.aof/mod.rs: the writer, reader, torn-tail helpers and paths, about 450 lines.AofRecordis re-exported, soaof::AofRecordstill works.aof/tests.rs: the tests, about 1,000 lines.ember-core/src/keyspace/mod.rsloses its trailing 1,200 lines of tests tokeyspace/tests.rs, leaving about 1,500 lines of code.No code changed.
AofRecord::decodeand one tag constant becamepub(super), and a few imports moved to the file that uses them. Clippy is clean and the tests pass with and without the optional features.