Repository navigation
fix(xyz): allow unused mut on non-Unix builds - #316
Conversation
The tempfile builder is only mutated in the #[cfg(unix)] permissions block, so Windows Clippy rejected the binding with -D unused-mut and broke the macOS and Windows CI on main.
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Conditional lint attribute crates/terrio/src/ops/xyz.rs |
The temporary-file builder binding allows unused_mut on non-Unix platforms. Its mutability is unchanged. |
Priority:
Estimated code review effort: 1 (Trivial) | ~2 minutes
Change: Bug fix
Possibly related PRs
- opengeos/terrio#303: Adds
write_xyz_fileand its Unix-only permission mutation, which the changed binding belongs to.
Merge Risk: 
Minimal · up to d8da1
-
The lint-only adjustment is mergeable with no identified behavior or availability impact.
Pre-merge checks: 
5
-
Full details: Docstring Coverage
-
Explanation
Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 1 functions across 1 files.
-
Finishing Touches
-
📝 Generate docstrings
-
- Commit to this branch
- Create a new PR
🧪 Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
A rabbit checks the builder’s name,
On non-Unix, the lint stays tame.
The binding keeps its mutable state,
While warnings wait outside the gate.
One quiet line completes the frame.
Comment @coderabbitai help to get the list of available commands.
Code reviewBugs: None found. The change is a single attribute, Security: None found. No input handling or I/O behaviour changes. (Confidence: high.) Performance: None found. (Confidence: high.) Quality: Nothing material. The attribute matches the feature-gated pattern already used at CLAUDE.md / AGENTS.md: The change is consistent with the repository instructions: a regression-free lint fix, with no shared-algorithm or binding changes. The PR body says No inline comments posted; there is nothing in the changed lines that needs a suggestion. Change sizeCompared with the base branch: the whole PR against main (merge base 67d87c2 to PR head d8da151).
|
Fixes the Windows Clippy failure on main (https://github.com/opengeos/terrio/actions/runs/40441232999/job/121981828434) introduced by #303:
write_xyz_filebindslet mut builder = tempfile::Builder::new()but only mutates it inside the#[cfg(unix)]permissions block, so-D warningsrejects the unusedmuton Windows.The fix adds
#[cfg_attr(not(unix), allow(unused_mut))]to the binding, the same patterncrates/terrio/src/info.rsuses for feature-gated mutation. No behavior change.Validation:
cargo fmt --all -- --checkandcargo clippy -p terrio --all-targets -- -D warningspass on Linux. A local Windows cross-check isn't possible here (no mingw C toolchain), so this PR carries theci:windowslabel to run the Windows job.Summary by CodeRabbit