summaryrefslogtreecommitdiff
path: root/tests/pws.rs
diff options
context:
space:
mode:
authorRobin Krahl <robin.krahl@ireas.org>2020-07-08 12:08:26 +0200
committerRobin Krahl <robin.krahl@ireas.org>2020-07-08 23:02:49 +0200
commit98232c7bc262dd3902b8f3e299196ab9c83fb355 (patch)
tree0f2a1ce830abf2378e78c7c74016f774f46fac7e /tests/pws.rs
parentcf460cbb5e616d12f5e6b1f64acddf3ec0e7b087 (diff)
downloadnitrokey-rs-98232c7bc262dd3902b8f3e299196ab9c83fb355.tar.gz
nitrokey-rs-98232c7bc262dd3902b8f3e299196ab9c83fb355.tar.bz2
Remove sync::PoisonError from Error::PoisonError
Previously, the Error::PoisonError contained the sync::PoisonError that caused the error. This is problematic as sync::PoisonError does not implement Send, making it impossible to use the Error enum with the anyhow crate. At the same time, storing the sync::PoisonError is not very useful. If a user wants to access the poisoned lock, they can call the force_take function. Therefore we remove the sync::PoisonError value from the Error:: PoisonError variant. This also allows us to simplify the From<sync::PoisonError<…>> and From<sync::TryLockError<…>> implementations as we no longer need to know the type of the mutex that caused the error. For more information, see this thread: https://lists.sr.ht/~ireas/nitrokey-rs-dev/%3C68ed0f3f-d98f-63bc-04d2-81b6d6cde560%40posteo.net%3E
Diffstat (limited to 'tests/pws.rs')
0 files changed, 0 insertions, 0 deletions