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)[..])
|
||||
.and_then(|globlist| {
|
||||
let v = globlist.filter_map(Result::ok)
|
||||
.map(|pbuf| FileID::from(&pbuf))
|
||||
.collect::<Vec<FileID>>()
|
||||
.into_iter();
|
||||
Ok(v)
|
||||
Ok(globlist.filter_map(Result::ok)
|
||||
.map(|pbuf| FileID::from(&pbuf))
|
||||
.collect::<Vec<FileID>>()
|
||||
.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
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue