-
Notifications
You must be signed in to change notification settings - Fork 78
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
Use a RefCell to provide interior mutability for VolumeManager. #143
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd prefer the change to try_borrow_mut, unless I'm missing some reason why that wouldn't be easily possible.
Otherwise, LGTM.
22fc45b
to
0abc8ef
Compare
I rebased. |
Rust is brilliant. I had very little trouble chopping up this codebase and hacking on that shell example to use the auto-closing |
6caee8d
to
2b5a863
Compare
Rebased again 😢 Make small PRs, they said. It's easier to review, they said. |
f29b9f7
to
f6eb622
Compare
Don't worry. It is easier to review! |
I wonder if I should turn off the thing that dismisses reviews as stale when a commit is added. |
Now we can open multiple files at once, we don't need to be so careful in our tree code.
Makes clippy happy
f6eb622
to
d2039d4
Compare
OK, all rebased and notes added about double locking. I think this monster is good to go. |
VolumeManager now contains a RefCell, so all the methods can be
&self
. This also means you can have multiple smart handles usable at the same time.Note that VolumeManager is !Sync, so this is just about having multiple
File
objects active at one time.Closes #79 (finally!)