Skip to content
This repository was archived by the owner on Aug 16, 2021. It is now read-only.

Commit 659b598

Browse files
committed
Merge tag '0.6.1'
2 parents 1a496cc + 187959b commit 659b598

File tree

4 files changed

+7
-4
lines changed

4 files changed

+7
-4
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
- New `Variant(Error) #[attrs]` for `links` and `foreign_links`.
44
- Hide implementation details from the doc.
55

6+
# 0.6.1
7+
8+
- Fix wrong trait constraint in ResultExt implementation (#66).
9+
610
# 0.6.0
711

812
- Conditional compilation for error variants.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22

33
name = "error-chain"
4-
version = "0.6.0"
4+
version = "0.6.1"
55
authors = [ "Brian Anderson <banderson@mozilla.com>",
66
"Paul Colomiets <paul@colomiets.name>",
77
"Colin Kiegel <kiegel@gmx.de>",

src/lib.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -330,12 +330,11 @@ pub trait ResultExt<T, E, CE: ChainedError> {
330330
EK: Into<CE::ErrorKind>;
331331
}
332332

333-
impl<T, E, CE> ResultExt<T, E, CE> for Result<T, E> where CE: ChainedError, E: Into<CE> {
333+
impl<T, E, CE> ResultExt<T, E, CE> for Result<T, E> where CE: ChainedError, E: error::Error + Send + 'static {
334334
fn chain_err<F, EK>(self, callback: F) -> Result<T, CE>
335335
where F: FnOnce() -> EK,
336336
EK: Into<CE::ErrorKind> {
337337
self.map_err(move |e| {
338-
let e = e.into();
339338
#[cfg(feature = "backtrace")]
340339
let state = {
341340
let backtrace = CE::extract_backtrace(&e)

tests/tests.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ fn chain_err() {
249249
}
250250

251251
let _: Result<()> = Err(fmt::Error).chain_err(|| "");
252-
let _: Result<()> = Err(ErrorKind::Test).chain_err(|| "");
252+
let _: Result<()> = Err(Error::from_kind(ErrorKind::Test)).chain_err(|| "");
253253
}
254254

255255
#[test]

0 commit comments

Comments
 (0)