aboutsummaryrefslogtreecommitdiff
path: root/src/device.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/device.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/device.rs')
-rw-r--r--src/device.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/device.rs b/src/device.rs
index fc07baf..cbc826e 100644
--- a/src/device.rs
+++ b/src/device.rs
@@ -536,7 +536,7 @@ fn connect_model(model: Model) -> bool {
}
impl DeviceWrapper {
- fn device(&self) -> &Device {
+ fn device(&self) -> &dyn Device {
match *self {
DeviceWrapper::Storage(ref storage) => storage,
DeviceWrapper::Pro(ref pro) => pro,