Skip to content

Conversation

@rarensu
Copy link
Contributor

@rarensu rarensu commented Sep 17, 2025

SessionUnmounter and BackgroundSession have unhandled .lock().unwrap() that causes clippy to complain that there should be a # Panic section in the function documentation. I think it's more appropriate to handle the poison error, rather than panic.

@rarensu
Copy link
Contributor Author

rarensu commented Sep 19, 2025

Additionally, some of those functions had an unused io::Result type that can be removed.

@rarensu
Copy link
Contributor Author

rarensu commented Sep 19, 2025

To clarify, this PR branches from PR #401 . That one should be merged first. Update: it has been merged.

@rarensu
Copy link
Contributor Author

rarensu commented Sep 19, 2025

To clarify, probably, the mutex lock will likely never actually ever become poisoned. There simply isn't any operation currently in use that can fail while holding the lock. So this error handling may never be reached. At least now the warning message in the code clearly demonstrates our intention is to ignore the error.

…, and friends.

This family of functions isn't actually capable of producing a meaningful `io` Error.
Instead, treating mount lock poison as a warning.
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