summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2018-12-05 19:01:42 +0100
committerMatthias Beyer <mail@beyermatthias.de>2019-02-15 20:53:28 +0100
commit642702b724e365ae67974bf4a0387dd54948f6e9 (patch)
treea1a85a752ff2b981b4c12d8af77472a51963fbf8 /lib
parentb66371f79b22fd017faacbc7120306b916bd2776 (diff)
Rewrite: StoreId::new_baseless() -> StoreId::new()
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Diffstat (limited to 'lib')
-rw-r--r--lib/core/libimagrt/src/runtime.rs2
-rw-r--r--lib/domain/libimagtimetrack/src/tag.rs2
-rw-r--r--lib/entry/libimagentrydatetime/src/datepath/compiler.rs2
-rw-r--r--lib/entry/libimagentrylink/src/internal.rs4
-rw-r--r--lib/entry/libimagentryref/src/refstore.rs4
-rw-r--r--lib/etc/libimaginteraction/src/ui.rs4
6 files changed, 9 insertions, 9 deletions
diff --git a/lib/core/libimagrt/src/runtime.rs b/lib/core/libimagrt/src/runtime.rs
index e5fd4041..4f2a485f 100644
--- a/lib/core/libimagrt/src/runtime.rs
+++ b/lib/core/libimagrt/src/runtime.rs
@@ -414,7 +414,7 @@ impl<'a> Runtime<'a> {
trace!("Got IDs = {}", buf);
buf.lines()
.map(PathBuf::from)
- .map(|id| StoreId::new_baseless(id).map_err(Error::from))
+ .map(|id| StoreId::new(id).map_err(Error::from))
.collect()
})
} else {
diff --git a/lib/domain/libimagtimetrack/src/tag.rs b/lib/domain/libimagtimetrack/src/tag.rs
index 2f099878..0bc96c42 100644
--- a/lib/domain/libimagtimetrack/src/tag.rs
+++ b/lib/domain/libimagtimetrack/src/tag.rs
@@ -65,7 +65,7 @@ impl<'a> From<&'a String> for TimeTrackingTag {
impl IntoStoreId for TimeTrackingTag {
fn into_storeid(self) -> Result<StoreId> {
- StoreId::new_baseless(PathBuf::from(self.0))
+ StoreId::new(PathBuf::from(self.0))
}
}
diff --git a/lib/entry/libimagentrydatetime/src/datepath/compiler.rs b/lib/entry/libimagentrydatetime/src/datepath/compiler.rs
index 037803dc..d7515d16 100644
--- a/lib/entry/libimagentrydatetime/src/datepath/compiler.rs
+++ b/lib/entry/libimagentrydatetime/src/datepath/compiler.rs
@@ -119,7 +119,7 @@ impl DatePathCompiler {
}
}
- StoreId::new_baseless(PathBuf::from(s))
+ StoreId::new(PathBuf::from(s))
}
}
diff --git a/lib/entry/libimagentrylink/src/internal.rs b/lib/entry/libimagentrylink/src/internal.rs
index 751f0b1e..7b092d24 100644
--- a/lib/entry/libimagentrylink/src/internal.rs
+++ b/lib/entry/libimagentrylink/src/internal.rs
@@ -568,7 +568,7 @@ fn process_rw_result(links: Result<Option<Value>>) -> Result<LinkIter> {
.map(|link| {
debug!("Matching the link: {:?}", link);
match link {
- Value::String(s) => StoreId::new_baseless(PathBuf::from(s))
+ Value::String(s) => StoreId::new(PathBuf::from(s))
.map(|s| Link::Id { link: s })
.map_err(From::from)
,
@@ -588,7 +588,7 @@ fn process_rw_result(links: Result<Option<Value>>) -> Result<LinkIter> {
debug!("Ok, here we go with building a Link::Annotated");
match (link, anno) {
(Value::String(link), Value::String(anno)) => {
- StoreId::new_baseless(PathBuf::from(link))
+ StoreId::new(PathBuf::from(link))
.map_err(From::from)
.map(|link| {
Link::Annotated {
diff --git a/lib/entry/libimagentryref/src/refstore.rs b/lib/entry/libimagentryref/src/refstore.rs
index 58f05b7b..c378d6fd 100644
--- a/lib/entry/libimagentryref/src/refstore.rs
+++ b/lib/entry/libimagentryref/src/refstore.rs
@@ -91,7 +91,7 @@ impl<'a> RefStore<'a> for Store {
fn get_ref<RPG: UniqueRefPathGenerator, H: AsRef<str>>(&'a self, hash: H)
-> Result<Option<FileLockEntry<'a>>>
{
- let sid = StoreId::new_baseless(PathBuf::from(format!("{}/{}", RPG::collection(), hash.as_ref())))
+ let sid = StoreId::new(PathBuf::from(format!("{}/{}", RPG::collection(), hash.as_ref())))
.map_err(Error::from)?;
debug!("Getting: {:?}", sid);
@@ -104,7 +104,7 @@ impl<'a> RefStore<'a> for Store {
{
let hash = RPG::unique_hash(&path)?;
let pathbuf = PathBuf::from(format!("{}/{}", RPG::collection(), hash));
- let sid = StoreId::new_baseless(pathbuf.clone())?;
+ let sid = StoreId::new(pathbuf.clone())?;
debug!("Creating: {:?}", sid);
self.create(sid)
diff --git a/lib/etc/libimaginteraction/src/ui.rs b/lib/etc/libimaginteraction/src/ui.rs
index 09395d54..0ad099a7 100644
--- a/lib/etc/libimaginteraction/src/ui.rs
+++ b/lib/etc/libimaginteraction/src/ui.rs
@@ -55,7 +55,7 @@ pub fn get_id(matches: &ArgMatches) -> Result<Vec<StoreId>> {
vals.into_iter()
.fold(Ok(vec![]), |acc, elem| {
acc.and_then(|mut v| {
- let elem = StoreId::new_baseless(PathBuf::from(String::from(elem)))?;
+ let elem = StoreId::new(PathBuf::from(String::from(elem)))?;
v.push(elem);
Ok(v)
})
@@ -70,7 +70,7 @@ pub fn get_or_select_id(matches: &ArgMatches, store_path: &PathBuf) -> Result<Ve
.or_else(|_| {
let path = store_path.clone();
let p = pick_file(default_menu_cmd, path)?;
- let id = StoreId::new_baseless(p)?;
+ let id = StoreId::new(p)?;
Ok(vec![id])
})
}