Skip to content

fix(lint): drop the box-editing tests' unwrap allows - #2074

Merged
Mavrick-F merged 1 commit into
opengeos:mainfrom
Mavrick-F:fix/box-edit-test-allows
Nov 14, 2026
Merged

Mavrick-F merged 1 commit into
opengeos:mainfrom
Mavrick-F:fix/box-edit-test-allows

Conversation

@Mavrick-F

@Mavrick-F Mavrick-F commented Nov 14, 2026 •

Copy link
Copy Markdown
Member

Summary

#1959 (rotated-box editing) and #2063 (lint suppressions say why) landed together. #1959's test modules in crates/engine/src/box_edit.rs and crates/ui-egui/src/boxedit.rs kept #[allow(clippy::unwrap_used, clippy::expect_used)], which #2063's allow_attributes and allow_attributes_without_reason lints refuse, so clippy fails on main and on every pull request merged with it.

This drops the two attributes, as #2063 did for the other test modules: clippy.toml already allows unwrap and expect in tests.

Testing

  • cargo clippy -p rustgis-engine -p rustgis-ui-egui --all-targets -- -D warnings passes (it failed on main with four errors on these two lines).
  • cargo xtask ci on the fork's CI.

UI evidence

No visible UI change.

Related issue

Follow-up to #1959 and #2063.

Summary by CodeRabbit

  • Chores
    • Updated lint handling for tests in two areas. There are no changes to user-visible behavior or public features.

opengeos#1959 and opengeos#2063 landed together: the rotated-box editing tests kept
`#[allow(clippy::unwrap_used, clippy::expect_used)]`, which opengeos#2063's
`allow_attributes` lints now refuse, so clippy fails on main.
clippy.toml already allows unwrap and expect in tests.
@coderabbitai

coderabbitai Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

Two test modules no longer have module-level Clippy allowances for unwrap_used and expect_used. The test code and runtime behavior remain unchanged.

Changes: Test lint allowances

Layer / File(s) Summary
Remove test module allowances
crates/engine/src/box_edit.rs, crates/ui-egui/src/boxedit.rs
Removed the module-level Clippy allowances for unwrap_used and expect_used. The tests remain unchanged.

Estimated code review effort: 1 (Trivial) | ~4 minutes

Change: Other

Suggested reviewers: robmarkcole

Merge Risk: Minimal · up to 91b7e

This change removes unneeded lint-suppression attributes from two test modules and does not change runtime behavior. It is low risk. The author reports that Clippy passes without the attributes, and any lint failure would be caught by CI.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title "fix(lint): drop the box-editing tests' unwrap allows" matches the main change. The PR removes the #[allow(clippy::unwrap_used, clippy::expect_used)] attributes from the test modules in crat…
Description check Passed The description covers the summary of the change and its reason. It explains that the attributes conflict with the allow_attributes and allow_attributes_without_reason lints from #2063, and that clipp…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title "fix(lint): drop the box-editing tests' unwrap allows" matches the main change. The PR removes the #[allow(clippy::unwrap_used, clippy::expect_used)] attributes from the test modules in crates/engine/src/box_edit.rs and crates/ui-egui/src/boxedit.rs. The title is concise, specific, and follows a conventional-commit style.

Full details: Description check

Explanation

The description covers the summary of the change and its reason. It explains that the attributes conflict with the allow_attributes and allow_attributes_without_reason lints from #2063, and that clippy.toml already allows unwrap and expect in tests. The Testing section lists the clippy command and CI run. The UI evidence section states no visible UI change, as the template requires. The Related issue section links #1959 and #2063 as a follow-up. The description follows the repository template.

Finishing Touches

Generate unit tests (beta)

  • 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.

Share

A rabbit checks the test files with care
Two lint shields vanish from the air
The tests stay just the same
No runtime change came
Then hops off, ears bright and fair

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: a6b6f31a-5af9-4a63-a080-1cb0d5cfc785
Commits

Reviewing files that changed from the base of the PR and between 8d99782 and 91b7ee7.

Files selected for processing: 2

  • crates/engine/src/box_edit.rs
  • crates/ui-egui/src/boxedit.rs
Files with no reviewable changes: 2

  • crates/engine/src/box_edit.rs
  • crates/ui-egui/src/boxedit.rs

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 3 remain after this review.

@github-actions

Copy link
Copy Markdown
Contributor

Code review

Reviewed the two-line diff that removes #[allow(clippy::unwrap_used, clippy::expect_used)] from the mod tests blocks in crates/engine/src/box_edit.rs and crates/ui-egui/src/boxedit.rs. No inline comments were needed.

Bugs: None found. The attribute is only on the test modules, so non-test code keeps the crate-root #![deny(clippy::unwrap_used, clippy::expect_used, …)]. The root's clippy.toml sets allow-unwrap-in-tests and allow-expect-in-tests, so the unwrap/expect calls in those modules (for example session() and add() in box_edit.rs) remain lint-clean. Confidence: high.

Security: None found. No input handling or secret-related code changed. Confidence: high.

Performance: None found. Test-only attribute change. Confidence: high.

Quality: None found. Both files have no other allow(clippy::…) left in the test modules, so the change matches the allow_attributes / allow_attributes_without_reason lints in the workspace Cargo.toml. Confidence: high.

AGENTS.md: None found. The change follows the "Never crash" rule: tests may use unwrap/expect, and no suppression was added. I did not run cargo clippy myself, so the claim that the lint now passes rests on reading the config and the PR's own testing note. Confidence in that claim: high.

Earlier review concerns left alone: 0 (there are no prior review threads on this PR).

Change size

Compared with main (merge base 8d99782 to PR head 91b7ee7).

Measure Value
Files changed 2 (added 0, modified 2, removed 0, renamed 0)
Size before 62.0 KB (63,480 B)
Size after 61.9 KB (63,378 B)
Total size change -102 B
Path Before After Change
crates/engine/src/box_edit.rs 32.5 KB (33,270 B) 32.4 KB (33,219 B) -51 B
crates/ui-egui/src/boxedit.rs 29.5 KB (30,210 B) 29.5 KB (30,159 B) -51 B

@github-actions

Copy link
Copy Markdown
Contributor

📖 Docs preview

Item Value
Preview https://preview.rustgis.app/pr-2074/
Web app https://preview.rustgis.app/pr-2074/app/
Commit 91b7ee7

GitHub Pages takes a minute or two to publish a new commit. Newer commits from the fork aren't published until a maintainer adds the preview label (once per commit).

@Mavrick-F
Mavrick-F merged commit f93576c into opengeos:main Nov 14, 2026
18 checks passed
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