refactor: remove dead SparseWriter decorator#6856
Merged
Merged
Conversation
The engine crate exposed a public SparseWriter<W> decorator wrapping any Write + Seek writer with its own zero-run scanning. It had no production caller: the live sparse write path goes through SparseWriteState::flush()/ finish() (state.rs), reached from context_impl/transfer.rs and delta_transfer.rs. SparseWriter was only referenced by its own tests and by re-export chains surfacing it publicly. Remove the type, its ZeroScanStrategy/SparseWriteStats companions, and the tests that exercised only the dead decorator. The live SparseWriteState path and its tests are untouched.
Match rustfmt's line-wrap width for the local_copy re-export list in lib.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.
Summary
SparseWriter<W>decorator (wrapping anyWrite + Seekwriter with its own zero-run scanning) that had no production caller. The live sparse write path goes throughSparseWriteState::flush()/finish()(sparse/state.rs), reached fromlocal_copy/executor/context_impl/transfer.rsanddelta_transfer.rs.SparseWriterwas reachable only via re-export chains (sparse/mod.rs->file/mod.rs->local_copy/mod.rs->executor/mod.rs->lib.rs) and its own dedicated tests that exercised the dead type itself, not the live path.ZeroScanStrategy/SparseWriteStatscompanions, the now-orphanedpub usechains, and the tests that covered only the dead decorator.SparseWriteStateand its tests are untouched.Test plan
cargo fmt -p engine -- --checkcargo clippy -p engine --all-targets --all-features --no-deps -- -D warningscargo nextest run -p engine --all-features -E 'test(sparse)'(151 passed)cargo clippy -p engine -p transfer -p cli --no-deps -- -D warnings(no downstream breakage from the removed public API)