From 1df484fd699f88b6d7e23c09464294a7c26c7e00 Mon Sep 17 00:00:00 2001 From: Robin Krahl Date: Tue, 14 Jan 2020 19:21:26 +0100 Subject: Bump nitrokey dependency to version 0.5.1 This change updates the version of the nitrokey crate that we use to 0.5.1. As part of that, it replaces occurrences of Storage::get_status with Storage::get_storage_status as the method has been renamed. --- src/commands.rs | 2 +- src/tests/encrypted.rs | 8 ++++---- src/tests/hidden.rs | 8 ++++---- src/tests/lock.rs | 2 +- src/tests/unencrypted.rs | 8 ++++---- 5 files changed, 14 insertions(+), 14 deletions(-) (limited to 'src') diff --git a/src/commands.rs b/src/commands.rs index 537a2cf..cc57786 100644 --- a/src/commands.rs +++ b/src/commands.rs @@ -356,7 +356,7 @@ fn print_status( if let nitrokey::DeviceWrapper::Storage(device) = device { let status = device - .get_status() + .get_storage_status() .map_err(|err| get_error("Getting Storage status failed", err))?; print_storage_status(ctx, &status) diff --git a/src/tests/encrypted.rs b/src/tests/encrypted.rs index 75b84c3..aed2662 100644 --- a/src/tests/encrypted.rs +++ b/src/tests/encrypted.rs @@ -77,8 +77,8 @@ fn encrypted_open_close(model: nitrokey::Model) -> crate::Result<()> { { let mut manager = nitrokey::force_take()?; let device = manager.connect_storage()?; - assert!(device.get_status()?.encrypted_volume.active); - assert!(!device.get_status()?.hidden_volume.active); + assert!(device.get_storage_status()?.encrypted_volume.active); + assert!(!device.get_storage_status()?.hidden_volume.active); } let out = ncli.handle(&["encrypted", "close"])?; @@ -87,8 +87,8 @@ fn encrypted_open_close(model: nitrokey::Model) -> crate::Result<()> { { let mut manager = nitrokey::force_take()?; let device = manager.connect_storage()?; - assert!(!device.get_status()?.encrypted_volume.active); - assert!(!device.get_status()?.hidden_volume.active); + assert!(!device.get_storage_status()?.encrypted_volume.active); + assert!(!device.get_storage_status()?.hidden_volume.active); } Ok(()) diff --git a/src/tests/hidden.rs b/src/tests/hidden.rs index 28a5d23..eabcfd4 100644 --- a/src/tests/hidden.rs +++ b/src/tests/hidden.rs @@ -31,8 +31,8 @@ fn hidden_create_open_close(model: nitrokey::Model) -> crate::Result<()> { { let mut manager = nitrokey::force_take()?; let device = manager.connect_storage()?; - assert!(!device.get_status()?.encrypted_volume.active); - assert!(device.get_status()?.hidden_volume.active); + assert!(!device.get_storage_status()?.encrypted_volume.active); + assert!(device.get_storage_status()?.hidden_volume.active); } let out = ncli.handle(&["hidden", "close"])?; @@ -41,8 +41,8 @@ fn hidden_create_open_close(model: nitrokey::Model) -> crate::Result<()> { { let mut manager = nitrokey::force_take()?; let device = manager.connect_storage()?; - assert!(!device.get_status()?.encrypted_volume.active); - assert!(!device.get_status()?.hidden_volume.active); + assert!(!device.get_storage_status()?.encrypted_volume.active); + assert!(!device.get_storage_status()?.hidden_volume.active); } Ok(()) diff --git a/src/tests/lock.rs b/src/tests/lock.rs index 5140152..b29f394 100644 --- a/src/tests/lock.rs +++ b/src/tests/lock.rs @@ -38,7 +38,7 @@ fn lock_storage(model: nitrokey::Model) -> crate::Result<()> { let mut manager = nitrokey::force_take()?; let device = manager.connect_storage()?; - assert!(!device.get_status()?.encrypted_volume.active); + assert!(!device.get_storage_status()?.encrypted_volume.active); Ok(()) } diff --git a/src/tests/unencrypted.rs b/src/tests/unencrypted.rs index 547dcaf..ceeb17c 100644 --- a/src/tests/unencrypted.rs +++ b/src/tests/unencrypted.rs @@ -28,8 +28,8 @@ fn unencrypted_set_read_write(model: nitrokey::Model) -> crate::Result<()> { { let mut manager = nitrokey::force_take()?; let device = manager.connect_storage()?; - assert!(device.get_status()?.unencrypted_volume.active); - assert!(!device.get_status()?.unencrypted_volume.read_only); + assert!(device.get_storage_status()?.unencrypted_volume.active); + assert!(!device.get_storage_status()?.unencrypted_volume.read_only); } let out = ncli.handle(&["unencrypted", "set", "read-only"])?; @@ -38,8 +38,8 @@ fn unencrypted_set_read_write(model: nitrokey::Model) -> crate::Result<()> { { let mut manager = nitrokey::force_take()?; let device = manager.connect_storage()?; - assert!(device.get_status()?.unencrypted_volume.active); - assert!(device.get_status()?.unencrypted_volume.read_only); + assert!(device.get_storage_status()?.unencrypted_volume.active); + assert!(device.get_storage_status()?.unencrypted_volume.read_only); } Ok(()) -- cgit v1.2.3