diff options
Diffstat (limited to 'bin/core/imag-link/src/main.rs')
-rw-r--r-- | bin/core/imag-link/src/main.rs | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/bin/core/imag-link/src/main.rs b/bin/core/imag-link/src/main.rs index dc9be715..cfd2c4fe 100644 --- a/bin/core/imag-link/src/main.rs +++ b/bin/core/imag-link/src/main.rs @@ -132,8 +132,7 @@ fn get_entry_by_name<'a>(rt: &'a Runtime, name: &str) -> Result<Option<FileLockE use libimagstore::storeid::StoreId; debug!("Getting: {:?}", name); - let result = StoreId::new(Some(rt.store().path().clone()), PathBuf::from(name)) - .and_then(|id| rt.store().get(id)); + let result = StoreId::new(PathBuf::from(name)).and_then(|id| rt.store().get(id)); debug!(" => : {:?}", result); result @@ -168,8 +167,8 @@ fn link_from_to<'a, I>(rt: &'a Runtime, from: &'a str, to: I) } else { debug!("Linking internally: {:?} -> {:?}", from, entry); - let from_id = StoreId::new_baseless(PathBuf::from(from)).map_err_trace_exit_unwrap(); - let entr_id = StoreId::new_baseless(PathBuf::from(entry)).map_err_trace_exit_unwrap(); + let from_id = StoreId::new(PathBuf::from(from)).map_err_trace_exit_unwrap(); + let entr_id = StoreId::new(PathBuf::from(entry)).map_err_trace_exit_unwrap(); if from_id == entr_id { error!("Cannot link entry with itself. Exiting"); @@ -366,13 +365,13 @@ mod tests { let mut path = PathBuf::new(); path.set_file_name(name); - let default_entry = Entry::new(StoreId::new_baseless(PathBuf::from("")).unwrap()) + let default_entry = Entry::new(StoreId::new(PathBuf::from("")).unwrap()) .to_str() .unwrap(); debug!("Default entry constructed"); - let id = StoreId::new_baseless(path)?; + let id = StoreId::new(path)?; debug!("StoreId constructed: {:?}", id); let mut entry = rt.store().create(id.clone())?; |