From 2b96a438791ff9d5409081ce5cb0c8265ddea6ae Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Mon, 25 Jan 2021 13:25:22 +0100 Subject: [PATCH] tape: cleanup - use ScsiMediaChange trait instead of mtx_status() --- src/tape/changer/online_status_map.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/tape/changer/online_status_map.rs b/src/tape/changer/online_status_map.rs index 869df5dc..c65cceaf 100644 --- a/src/tape/changer/online_status_map.rs +++ b/src/tape/changer/online_status_map.rs @@ -17,7 +17,7 @@ use crate::{ MediaChange, MtxStatus, ElementStatus, - mtx::mtx_status, + ScsiMediaChange, }, }, }; @@ -133,8 +133,8 @@ pub fn update_online_status(state_path: &Path) -> Result let mut map = OnlineStatusMap::new(&config)?; - for changer in changers { - let status = match mtx_status(&changer) { + for mut changer in changers { + let status = match changer.status() { Ok(status) => status, Err(err) => { eprintln!("unable to get changer '{}' status - {}", changer.name, err);