summaryrefslogtreecommitdiffstats
path: root/lib/core/libimagstore/src/file_abstraction/inmemory.rs
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2020-03-08 12:06:42 +0100
committerMatthias Beyer <mail@beyermatthias.de>2020-03-08 12:06:42 +0100
commitcb9f6e7f46eb1a05071947d5f28bb1fe45313734 (patch)
tree6e5a8e08e5b204f202de335d412de3f69196ce12 /lib/core/libimagstore/src/file_abstraction/inmemory.rs
parent00aa4df88edae1d5eeb3fb365af05f95bd0de3b4 (diff)
parent666193dfc26181b6606cb85de5389c4ed6ece5eb (diff)
Merge branch 'replace-failure-with-anyhow'
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Diffstat (limited to 'lib/core/libimagstore/src/file_abstraction/inmemory.rs')
-rw-r--r--lib/core/libimagstore/src/file_abstraction/inmemory.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/core/libimagstore/src/file_abstraction/inmemory.rs b/lib/core/libimagstore/src/file_abstraction/inmemory.rs
index 2deabcae..f6a0e289 100644
--- a/lib/core/libimagstore/src/file_abstraction/inmemory.rs
+++ b/lib/core/libimagstore/src/file_abstraction/inmemory.rs
@@ -24,11 +24,11 @@ use std::cell::RefCell;
use std::sync::Arc;
use std::ops::Deref;
-use libimagerror::errors::ErrorMsg as EM;
+use libimagerror::errors::Error as EM;
+
+use anyhow::Result;
+use anyhow::Error;
-use failure::Fallible as Result;
-use failure::Error;
-use failure::err_msg;
use super::FileAbstraction;
use super::FileAbstractionInstance;
@@ -140,7 +140,7 @@ impl FileAbstraction for InMemoryFileAbstraction {
let a = backend.remove(from).ok_or_else(|| EM::FileNotFound)?;
let new_entry = {
let new_location = if to.starts_with("/") {
- let s = to.to_str().map(String::from).ok_or_else(|| err_msg("Failed to convert path to str"))?;
+ let s = to.to_str().map(String::from).ok_or_else(|| anyhow!("Failed to convert path to str"))?;
PathBuf::from(s.replace("/", ""))
} else {
to.to_path_buf()