Replace error-chain for client error (#2231)

* WIP: convert client error

* Remove error_chain for client error

* Ignore tx-pool error deprecation warning

* Update Cargo.lock files

* Fix tests

* Increment impl_version

* Derive From impls, remove allow(missing_docs)

* Remove space

* Remove redundant into()s

* Blockchain Error source

* Bump impl version
This commit is contained in:
Andrew Jones
2019-04-11 20:33:43 +01:00
committed by Bastian Köcher
parent 1e0c1d8850
commit 7f59cdb900
39 changed files with 298 additions and 290 deletions
+3 -3
View File
@@ -32,7 +32,7 @@ pub fn read_children<
let raw_val_opt = match db.get(column, &buf[..]) {
Ok(raw_val_opt) => raw_val_opt,
Err(_) => return Err(error::ErrorKind::Backend("Error reading value from database".into()).into()),
Err(_) => return Err(error::Error::Backend("Error reading value from database".into())),
};
let raw_val = match raw_val_opt {
@@ -42,7 +42,7 @@ pub fn read_children<
let children: Vec<V> = match Decode::decode(&mut &raw_val[..]) {
Some(children) => children,
None => return Err(error::ErrorKind::Backend("Error decoding children".into()).into()),
None => return Err(error::Error::Backend("Error decoding children".into())),
};
Ok(children)
@@ -118,4 +118,4 @@ mod tests {
assert_eq!(r1, vec![1_3, 1_5]);
assert_eq!(r2.len(), 0);
}
}
}