diff options
author | Robin Krahl <robin.krahl@ireas.org> | 2019-07-09 10:44:45 +0000 |
---|---|---|
committer | Robin Krahl <robin.krahl@ireas.org> | 2019-07-09 12:47:26 +0200 |
commit | 5e8f0fbaf6df0cb919e4b02401cc21d5280bf09c (patch) | |
tree | 2495451253d9634e2ef1b5f4972bea93d634c2d7 /CHANGELOG.md | |
parent | 88b32f5c2187e59fece93cd245aeadb4e5f9e04a (diff) | |
download | nitrokey-rs-5e8f0fbaf6df0cb919e4b02401cc21d5280bf09c.tar.gz nitrokey-rs-5e8f0fbaf6df0cb919e4b02401cc21d5280bf09c.tar.bz2 |
Add force_take function to ignore poisoned cache
The take and take_blocking functions return a PoisonError if the cache
is poisoned, i. e. if a thread panicked while holding the manager. This
is a sensible default behaviour, but for example during testing, one
might want to ignore the poisoned cache. This patch adds the force_take
function that unwraps the PoisonError and returns the cached Manager
even if the cache was poisoned.
Diffstat (limited to 'CHANGELOG.md')
-rw-r--r-- | CHANGELOG.md | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 06769bd..b779929 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -46,6 +46,8 @@ SPDX-License-Identifier: MIT - Add the `Manager` struct that manages connections to Nitrokey devices. - Remove `connect`, `connect_model`, `Pro::connect` and `Storage::connect`. - Add the `into_manager` function to the `Device` trait. + - Add the `force_take` function that ignores a `PoisonError` when accessing + the manager instance. # v0.3.4 (2019-01-20) - Fix authentication methods that assumed that `char` is signed. |