if let Some(ref upid) = status_in_memory.upid {
let mut computed_schedule: JobScheduleStatus = JobScheduleStatus::default();
if let Some(state) = state_file {
- if let Ok(cs) = compute_schedule_status(&state, Some(&upid)) {
+ if let Ok(cs) = compute_schedule_status(&state, Some(upid)) {
computed_schedule = cs;
}
}
let path = "api2/json/admin/gc";
- let mut result = client.get(&path, None).await?;
+ let mut result = client.get(path, None).await?;
let mut data = result["data"].take();
let return_type = &api2::admin::gc::API_METHOD_LIST_ALL_GC_JOBS.returns;
let mut pool = MediaPool::new(
"p1",
- &testdir,
+ testdir,
MediaSetPolicy::ContinueCurrent,
RetentionPolicy::KeepForever,
None,
let pool = MediaPool::new(
"p1",
- &testdir,
+ testdir,
MediaSetPolicy::AlwaysCreate,
RetentionPolicy::KeepForever,
None,
fn test_media_state_db() -> Result<(), Error> {
let testdir = create_testdir("test_media_state_db")?;
- let mut inventory = Inventory::load(&testdir)?;
+ let mut inventory = Inventory::load(testdir)?;
let uuid1: Uuid = inventory.generate_free_tape("tape1", 0);
#[test]
fn test_list_pool_media() -> Result<(), Error> {
let testdir = create_testdir("test_list_pool_media")?;
- let mut inventory = Inventory::load(&testdir)?;
+ let mut inventory = Inventory::load(testdir)?;
let ctime = 0;
assert_eq!(media.label.label_text, label);
};
- let mut inventory = Inventory::load(&testdir)?;
+ let mut inventory = Inventory::load(testdir)?;
let ctime = 0;