Skip to content

refactor: split aof.rs and move the keyspace tests out - #421

Merged
kacy merged 2 commits into
mainfrom
refactor/split-aof-and-keyspace-tests
Sep 24, 2026
Merged

kacy merged 2 commits into
mainfrom
refactor/split-aof-and-keyspace-tests

Conversation

@kacy

@kacy kacy commented Sep 24, 2026

Copy link
Copy Markdown
Owner

Two more long files. Two commits:

  1. ember-persistence/src/aof.rs (about 2,500 lines) becomes a directory:
    • aof/record.rs: AofRecord and its binary encoding, about 1,000 lines.
    • aof/mod.rs: the writer, reader, torn-tail helpers and paths, about 450 lines. AofRecord is re-exported, so aof::AofRecord still works.
    • aof/tests.rs: the tests, about 1,000 lines.
  2. ember-core/src/keyspace/mod.rs loses its trailing 1,200 lines of tests to keyspace/tests.rs, leaving about 1,500 lines of code.

No code changed. AofRecord::decode and one tag constant became pub(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.

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.
@kacy
kacy merged commit 5863ba9 into main Sep 24, 2026
12 checks passed
@kacy
kacy deleted the refactor/split-aof-and-keyspace-tests branch September 24, 2026 21:33
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