fix build warnings

And in Travis CI, treat warnings as error
to keep from merging codes with warning.

Fixes: #13

Signed-off-by: bin liu <bin@hyper.sh>
This commit is contained in:
bin liu
2020-09-23 15:43:05 +08:00
parent d18b3bac2f
commit 152af17f8f
20 changed files with 50 additions and 36 deletions

View File

@@ -45,7 +45,7 @@ pub enum ErrorKind {
#[derive(Debug)]
pub struct Error {
kind: ErrorKind,
cause: Option<Box<StdError + Send + Sync>>,
cause: Option<Box<dyn StdError + Send + Sync>>,
}
impl fmt::Display for Error {
@@ -67,7 +67,7 @@ impl fmt::Display for Error {
}
impl StdError for Error {
fn cause(&self) -> Option<&StdError> {
fn cause(&self) -> Option<&dyn StdError> {
match self.cause {
Some(ref x) => Some(&**x),
None => None,