aboutsummaryrefslogtreecommitdiff
path: root/src/pws.rs
diff options
context:
space:
mode:
authorRobin Krahl <robin.krahl@ireas.org>2018-12-16 12:28:46 +0100
committerRobin Krahl <robin.krahl@ireas.org>2018-12-16 12:28:46 +0100
commitec9c03c0a21f9220b44f85a4734feca532b89e43 (patch)
tree8f1dae3e513e3ec2c51f9003b2e39f46f4691f3e /src/pws.rs
parent2452d3e9e5c8570d1e04934a80e808ea4755ee36 (diff)
downloadnitrokey-rs-ec9c03c0a21f9220b44f85a4734feca532b89e43.tar.gz
nitrokey-rs-ec9c03c0a21f9220b44f85a4734feca532b89e43.tar.bz2
Make hidden life time parameters explicit
This patch makes hidden life time parameters explicit to fix elided-lifetime-in-path compiler warnings.
Diffstat (limited to 'src/pws.rs')
-rw-r--r--src/pws.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/pws.rs b/src/pws.rs
index c20fe9d..f283d2b 100644
--- a/src/pws.rs
+++ b/src/pws.rs
@@ -98,7 +98,7 @@ pub trait GetPasswordSafe {
/// [`lock`]: trait.Device.html#method.lock
/// [`InvalidString`]: enum.CommandError.html#variant.InvalidString
/// [`WrongPassword`]: enum.CommandError.html#variant.WrongPassword
- fn get_password_safe(&self, user_pin: &str) -> Result<PasswordSafe, CommandError>;
+ fn get_password_safe(&self, user_pin: &str) -> Result<PasswordSafe<'_>, CommandError>;
}
fn get_password_safe<'a>(
@@ -333,19 +333,19 @@ impl<'a> Drop for PasswordSafe<'a> {
}
impl GetPasswordSafe for Pro {
- fn get_password_safe(&self, user_pin: &str) -> Result<PasswordSafe, CommandError> {
+ fn get_password_safe(&self, user_pin: &str) -> Result<PasswordSafe<'_>, CommandError> {
get_password_safe(self, user_pin)
}
}
impl GetPasswordSafe for Storage {
- fn get_password_safe(&self, user_pin: &str) -> Result<PasswordSafe, CommandError> {
+ fn get_password_safe(&self, user_pin: &str) -> Result<PasswordSafe<'_>, CommandError> {
get_password_safe(self, user_pin)
}
}
impl GetPasswordSafe for DeviceWrapper {
- fn get_password_safe(&self, user_pin: &str) -> Result<PasswordSafe, CommandError> {
+ fn get_password_safe(&self, user_pin: &str) -> Result<PasswordSafe<'_>, CommandError> {
get_password_safe(self, user_pin)
}
}