Skip to content

Mark message builder modifiers as must-use - #407

Closed
oferchen wants to merge 1 commit into
masterfrom
establish-rsync-protocol-fidelity-6z35zb
Closed

oferchen wants to merge 1 commit into
masterfrom
establish-rsync-protocol-fidelity-6z35zb

Conversation

@oferchen

@oferchen oferchen commented Oct 17, 2025 •

Copy link
Copy Markdown
Owner

Summary

  • mark Message::with_role and Message::with_source as #[must_use] to prevent silently discarding trailer metadata during chaining

Testing

  • cargo test -p rsync-core

Parity

  • Red → Green count: 0 (non-functional change)
  • Affected goldens: N/A
  • Upstream reference: no behavior change; builder now enforces existing usage contract.

@oferchen oferchen closed this Oct 17, 2025
@oferchen
oferchen deleted the establish-rsync-protocol-fidelity-6z35zb branch October 17, 2025 21:17
oferchen added a commit that referenced this pull request Nov 15, 2026
…rd-link detection (#277) (#8387)

## Summary
- **#311 (`crates/platform/src/signal.rs`):** Factor Windows console
control event dispatch out of the `unsafe extern "system" fn handler`
into `dispatch_console_ctrl(ctrl_type, shutdown, graceful) -> bool` with
compile-time `const` assertions against Win32 `CTRL_*_EVENT` constants
and cross-platform unit tests.
- **#277 (`crates/fast_io/src/same_fs.rs`,
`crates/engine/src/local_copy/hard_links/windows.rs`,
`crates/engine/src/local_copy/executor/file/copy/links.rs`):**
- Add `fast_io::same_fs::FileIdentity` and `file_identity(path)` sharing
a single `windows_file_info` (`GetFileInformationByHandle`) helper on
Windows and `symlink_metadata` on Unix.
- Implement Windows `HardLinkTracker` (`existing_target_for_path` /
`record_for_path`) keyed by `(volume_id, file_index)` when `nlink > 1`,
and wire `source` at local-copy call sites.
- Implement `is_already_hardlinked(destination, target)` via
`fast_io::same_fs::file_identity` on both Unix and Windows.
- Note from audit: **#407** (`test_copy_partial_eof` temp-file
pid-unique naming) was already fixed in `7bc2964a4` (#8139), and
**#353** (required Windows CI full workspace test surface) landed in
`c88299623` (#8316).

## Verification
- `cargo fmt --all -- --check`
- `cargo test --locked -p platform`: 88 passed, 0 failed
- `cargo test --locked -p fast_io --lib same_fs`: 6 passed, 0 failed
(1111 filtered out)
- `cargo test --locked -p engine --lib local_copy::hard_links`: 50
passed, 0 failed (4559 filtered out)
- `cargo clippy --locked -p platform -p fast_io -p engine --all-targets
-- -D warnings`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant