summaryrefslogtreecommitdiff
path: root/src/pws.rs
diff options
context:
space:
mode:
authorRobin Krahl <robin.krahl@ireas.org>2018-12-16 12:28:58 +0100
committerRobin Krahl <robin.krahl@ireas.org>2018-12-16 12:28:58 +0100
commit048d4fa5529bf33e21f11873792cdacfcaf7793f (patch)
tree354972cf2cd5cc39dbf62eab69f04ad79696532f /src/pws.rs
parentec9c03c0a21f9220b44f85a4734feca532b89e43 (diff)
downloadnitrokey-rs-048d4fa5529bf33e21f11873792cdacfcaf7793f.tar.gz
nitrokey-rs-048d4fa5529bf33e21f11873792cdacfcaf7793f.tar.bz2
Use the dyn syntax for trait objects
This patch changes the type of trait objects from `Trait` to `dyn Trait`. This fixes bare-trait-object compiler warnings.
Diffstat (limited to 'src/pws.rs')
-rw-r--r--src/pws.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pws.rs b/src/pws.rs
index f283d2b..d73f44c 100644
--- a/src/pws.rs
+++ b/src/pws.rs
@@ -51,7 +51,7 @@ pub const SLOT_COUNT: u8 = 16;
/// [`lock`]: trait.Device.html#method.lock
/// [`GetPasswordSafe`]: trait.GetPasswordSafe.html
pub struct PasswordSafe<'a> {
- _device: &'a Device,
+ _device: &'a dyn Device,
}
/// Provides access to a [`PasswordSafe`][].
@@ -102,7 +102,7 @@ pub trait GetPasswordSafe {
}
fn get_password_safe<'a>(
- device: &'a Device,
+ device: &'a dyn Device,
user_pin: &str,
) -> Result<PasswordSafe<'a>, CommandError> {
let user_pin_string = get_cstring(user_pin)?;