Split disk code into per-OS modules - #81
Open
justanotherariel wants to merge 4 commits into
Open
Conversation
Move the inline mod macos/linux/windows blocks into
devices/{macos,linux,windows}.rs and disk_writer/{macos,linux,windows}.rs,
each carrying its own platform tests. The parent files keep the public
API, the cfg dispatch, the shared safety checks (validate_device_path,
is_drive_disconnected) and the cross-platform tests. Pure code motion,
no behavior change.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
17 tasks
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.
Description
Pure code motion, stacked on #14 — review with
git diff --color-moved.mod macos/linux/windowsblocks indevices.rsanddisk_writer.rsmove to per-OS files, imported as a singlemod impvia#[path], so dispatch is oneimp::call instead of one cfg block per function.is_ok() || is_err()tautologies).Type of Change
Related Issues
Stacked on #14; base of #82 and #83.
Testing
cargo test -p hai-core --features mockpasses on Linux; the moved tests run identically under their new module paths.Screenshots
N/A — no UI changes.
Checklist
cargo fmtandnpm run lintDO NOT MERGE. After reviewing, merge #14 to merge all directly