Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(neon): fix clippy lints #1085

Merged
merged 6 commits into from
Nov 26, 2024
Merged

chore(neon): fix clippy lints #1085

merged 6 commits into from
Nov 26, 2024

Conversation

dherman
Copy link
Collaborator

@dherman dherman commented Nov 22, 2024

This PR fixes the Clippy lints exposed by the awesome refactoring done in #1065.

@dherman dherman changed the title chore(neon): fix Clippy lints exposed by #1065 chore(neon): fix clippy lints Nov 22, 2024
@dherman dherman marked this pull request as ready for review November 23, 2024 01:28
@dherman dherman requested a review from kjvalencik November 23, 2024 01:28
Copy link
Member

@kjvalencik kjvalencik left a comment

Choose a reason for hiding this comment

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

@dherman, it's awesome to get these fixed! I think a couple of the memory leak releases shouldn't panic.

Maybe a good compromise is to panic in debug mode and ignore in release mode?

Additionally, I haven't traced through, but the return false on any error lines seem incorrect. Those should probably only return false on exception.

crates/neon/src/sys/async_work.rs Outdated Show resolved Hide resolved
crates/neon/src/sys/object.rs Outdated Show resolved Hide resolved
crates/neon/src/sys/tsfn.rs Outdated Show resolved Hide resolved
crates/neon/src/sys/object.rs Outdated Show resolved Hide resolved
…view:

- style: don't `assert_eq!` of `Ok(())`, just `.unwrap()`
- style: capitalize no_panic error message strings
- logic: don't unwrap deleting async work if we're about to fail with a more clear error anyway
- logic: when returning false to propagate exceptions, only do so on PendingException; panic on other errors
@kjvalencik
Copy link
Member

kjvalencik commented Nov 26, 2024

Awesome changes! 🐛 🪲 🔨

@dherman dherman merged commit efba683 into main Nov 26, 2024
9 checks passed
@dherman dherman deleted the clippy-fixes-nov-24 branch November 26, 2024 17:53
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.

2 participants