From 2e140d0684f332ed86d1c8448060590ea338c8ff Mon Sep 17 00:00:00 2001 From: John Gallagher Date: Sat, 31 Dec 2016 00:36:52 -0500 Subject: [PATCH] FromSqlError::cause() returns other error's cause directly (possibly None). --- src/types/from_sql.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/types/from_sql.rs b/src/types/from_sql.rs index 90c5c0f..3c78d7c 100644 --- a/src/types/from_sql.rs +++ b/src/types/from_sql.rs @@ -33,7 +33,7 @@ impl Error for FromSqlError { fn cause(&self) -> Option<&Error> { match *self { FromSqlError::InvalidType => None, - FromSqlError::Other(ref err) => Some(&**err), + FromSqlError::Other(ref err) => err.cause(), } } }