Skip to content

Conversation

@yew1eb
Copy link
Contributor

@yew1eb yew1eb commented Nov 21, 2025

Which issue does this PR close?

Closes #1637 .

Rationale for this change

What changes are included in this PR?

Are there any user-facing changes?

How was this patch tested?

@yew1eb
Copy link
Contributor Author

yew1eb commented Nov 21, 2025

cc @richox

@yew1eb yew1eb changed the title [AURON #1637] Enforce Clippy lint and replace unwrap with expect [AURON #1637] Enforce Clippy lint Nov 21, 2025
@yew1eb yew1eb force-pushed the add_clippy_lint branch 2 times, most recently from 7bee180 to cd9dd8e Compare November 21, 2025 11:27
@yew1eb yew1eb changed the title [AURON #1637] Enforce Clippy lint [AURON #1637] Enforce Clippy lint and replace unwrap with expect Nov 21, 2025
@richox
Copy link
Contributor

richox commented Nov 25, 2025

we can use Result<()> return type in test cases, so unwraps can be replaced with ?

@github-actions github-actions bot added the spark label Nov 25, 2025
@yew1eb yew1eb force-pushed the add_clippy_lint branch 2 times, most recently from b589ad1 to fdfe215 Compare November 25, 2025 11:57
@github-actions github-actions bot removed the spark label Nov 25, 2025
@yew1eb yew1eb changed the title [AURON #1637] Enforce Clippy lint and replace unwrap with expect [AURON #1637] Enforce Clippy lint and Eliminate unwrap Nov 25, 2025
@yew1eb
Copy link
Contributor Author

yew1eb commented Nov 26, 2025

@richox all unwraps are removed (including tests). Rust tests and Clippy passed. Please take a look, CI currently denies unwrap_used; once that's done, we'll switch to -D warnings to enforce all default lints.

@yew1eb
Copy link
Contributor Author

yew1eb commented Nov 28, 2025

@richox CI Green, PTAL.

@yew1eb
Copy link
Contributor Author

yew1eb commented Dec 1, 2025

@richox could you please take a look?


fn update(&self) {
let _lock = self.mutex.lock().unwrap();
let _lock = self.mutex.lock().expect("lock");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we replace this with parking_lot::Mutex, it has a unwrap-free lock API

@yew1eb
Copy link
Contributor Author

yew1eb commented Dec 3, 2025

@richox I’ve addressed all your comments and updated the PR. PTAL.

@yew1eb
Copy link
Contributor Author

yew1eb commented Dec 12, 2025

@richox PTAL when you get a moment. Thank you! :)

@yew1eb yew1eb requested a review from richox December 17, 2025 02:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Introduce #![deny(clippy::unwrap_used)]

2 participants