Skip to content

Add From<TryLockError> for io::Error #141312

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

cberner
Copy link
Contributor

@cberner cberner commented May 20, 2025

Adds a From impl to make error propagation easier, as discussed in the tracking issue

TryLockError is unstable under the "file_lock" feature. The related tracking issue is #130994

This PR also cleanups the Windows implementation of try_lock() and try_lock_shared() as discussed here

cberner added 2 commits May 20, 2025 14:09
try_lock() and try_lock_shared() do not need to handle these per the discussion in rust-lang#140718 (comment)
This makes error propagation from try_lock() and try_lock_shared()
more convenient
@rustbot
Copy link
Collaborator

rustbot commented May 20, 2025

r? @thomcc

rustbot has assigned @thomcc.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels May 20, 2025
@cberner
Copy link
Contributor Author

cberner commented May 20, 2025

r? joshtriplett

@rustbot rustbot assigned joshtriplett and unassigned thomcc May 20, 2025
@joshtriplett
Copy link
Member

The non-windows parts look good to me. r=me if @ChrisDenton says the windows parts are fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants