Closed vlovich closed 5 months ago
I don't see a problem with this pattern. But tests failing =(
I haven't incorporated running clippy into my muscle memory. Should start doing that on my project. Fixed.
Fixed my vscode settings for this project so hopefully won't come up again (clippy run by rust-analyzer & highlights problems inline on save).
What does this PR do?
Introduces
WeakDmaFile
to be able to construct a non-owning reference that can be upgraded to an owning one.Motivation
When I went to migrate my current usage of wrapping DmaFile with Rc, I realized there's a spot I use weak Rc. So instead of having a weird pattern of Rc over something using Arc internally, it would be nice to use a proper weak reference to the DmaFile.
Related issues
646
Additional Notes
Checklist
[X] I have added unit tests to the code I am submitting [X] My unit tests cover both failure and success scenarios [] If applicable, I have discussed my architecture