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

Consider using must_use attribute for some functions #14

Open
FrancisRussell opened this issue Sep 9, 2023 · 1 comment
Open

Consider using must_use attribute for some functions #14

FrancisRussell opened this issue Sep 9, 2023 · 1 comment

Comments

@FrancisRussell
Copy link

Functions like try_lock and try_lock_with_pid are nonsensical to use without looking at their return value. It feels like these and maybe owns_lock are candidates for the must_use attribute.

@brunoczim
Copy link
Owner

Hmmm, aren't try_lock and try_lock_with_pid already affected by must_use since they return Result? I am not sure if there is a way to make a nested #[must_use] regarding the Ok(bool) scenario.

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

No branches or pull requests

2 participants