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:
Matthias Beyer 2015-12-04 14:46:32 +01:00
parent 87d9ca7d06
commit 90e3f44005

View file

@ -56,17 +56,18 @@ impl StorageBackend {
{
glob(&self.prefix_of_files_for_module(m)[..])
.and_then(|globlist| {
let v = globlist.filter_map(Result::ok)
Ok(globlist.filter_map(Result::ok)
.map(|pbuf| FileID::from(&pbuf))
.collect::<Vec<FileID>>()
.into_iter();
Ok(v)
.into_iter())
})
.map_err(|e| {
let serr = StorageBackendError::new(
"iter_ids()",
"Cannot iter on file ids",
None);
// Why the hack is Error not implemented for glob::PatternError
// serr.caused_by = Some(Box::new(e));
serr
})
}