StorageBackend::iter_ids(): Add caused_by() usage
Actually not, as there is no Error implementation for the error we get to handle here.
This commit is contained in:
parent
87d9ca7d06
commit
90e3f44005
1 changed files with 6 additions and 5 deletions
|
@ -56,17 +56,18 @@ impl StorageBackend {
|
||||||
{
|
{
|
||||||
glob(&self.prefix_of_files_for_module(m)[..])
|
glob(&self.prefix_of_files_for_module(m)[..])
|
||||||
.and_then(|globlist| {
|
.and_then(|globlist| {
|
||||||
let v = globlist.filter_map(Result::ok)
|
Ok(globlist.filter_map(Result::ok)
|
||||||
.map(|pbuf| FileID::from(&pbuf))
|
.map(|pbuf| FileID::from(&pbuf))
|
||||||
.collect::<Vec<FileID>>()
|
.collect::<Vec<FileID>>()
|
||||||
.into_iter();
|
.into_iter())
|
||||||
Ok(v)
|
|
||||||
})
|
})
|
||||||
.map_err(|e| {
|
.map_err(|e| {
|
||||||
let serr = StorageBackendError::new(
|
let serr = StorageBackendError::new(
|
||||||
"iter_ids()",
|
"iter_ids()",
|
||||||
"Cannot iter on file ids",
|
"Cannot iter on file ids",
|
||||||
None);
|
None);
|
||||||
|
// Why the hack is Error not implemented for glob::PatternError
|
||||||
|
// serr.caused_by = Some(Box::new(e));
|
||||||
serr
|
serr
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue