remove anyhow refs & implement missing errors

This commit is contained in:
marin postma
2021-06-14 21:26:35 +02:00
parent c1b6f0e833
commit 58f9974be4
40 changed files with 707 additions and 668 deletions

View File

@ -39,7 +39,7 @@ pub struct HeedUuidStore {
}
impl HeedUuidStore {
pub fn new(path: impl AsRef<Path>) -> anyhow::Result<Self> {
pub fn new(path: impl AsRef<Path>) -> Result<Self> {
let path = path.as_ref().join(UUIDS_DB_PATH);
create_dir_all(&path)?;
let mut options = EnvOpenOptions::new();
@ -153,7 +153,7 @@ impl HeedUuidStore {
Ok(uuids)
}
pub fn load_dump(src: impl AsRef<Path>, dst: impl AsRef<Path>) -> anyhow::Result<()> {
pub fn load_dump(src: impl AsRef<Path>, dst: impl AsRef<Path>) -> Result<()> {
let uuid_resolver_path = dst.as_ref().join(UUIDS_DB_PATH);
std::fs::create_dir_all(&uuid_resolver_path)?;