fuser icon indicating copy to clipboard operation
fuser copied to clipboard

Don't panic

Open rarensu opened this issue 3 months ago • 3 comments

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 avatar Sep 17 '25 16:09 rarensu

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

rarensu avatar Sep 19 '25 16:09 rarensu

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

rarensu avatar Sep 19 '25 16:09 rarensu

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.

rarensu avatar Sep 19 '25 16:09 rarensu