From c270599a2316949b45949be332989c222d7ef7a5 Mon Sep 17 00:00:00 2001 From: Artem Vorotnikov Date: Wed, 29 Jul 2020 18:38:27 +0300 Subject: [PATCH] Fix warnings: other --- accounts/ethkey/src/crypto.rs | 2 ++ miner/stratum/src/traits.rs | 4 ++-- updater/hash-fetch/src/urlhint.rs | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/accounts/ethkey/src/crypto.rs b/accounts/ethkey/src/crypto.rs index 6fccba941..a9406c7b7 100644 --- a/accounts/ethkey/src/crypto.rs +++ b/accounts/ethkey/src/crypto.rs @@ -14,6 +14,8 @@ // You should have received a copy of the GNU General Public License // along with Parity Ethereum. If not, see . +#![allow(deprecated)] + use parity_crypto::error::SymmError; use secp256k1; use std::io; diff --git a/miner/stratum/src/traits.rs b/miner/stratum/src/traits.rs index c1b86fdd4..ce25d97a0 100644 --- a/miner/stratum/src/traits.rs +++ b/miner/stratum/src/traits.rs @@ -16,7 +16,7 @@ use ethereum_types::H256; use jsonrpc_tcp_server::PushMessageError; -use std::{self, error::Error as StdError}; +use std; #[derive(Debug, Clone)] pub enum Error { @@ -29,7 +29,7 @@ pub enum Error { impl From for Error { fn from(err: std::io::Error) -> Self { - Error::Io(err.description().to_owned()) + Error::Io(err.to_string()) } } diff --git a/updater/hash-fetch/src/urlhint.rs b/updater/hash-fetch/src/urlhint.rs index 0dffda35a..5dcd446b3 100644 --- a/updater/hash-fetch/src/urlhint.rs +++ b/updater/hash-fetch/src/urlhint.rs @@ -214,7 +214,7 @@ fn guess_mime_type(url: &str) -> Option { } } url.and_then(|url| url.split('.').last()) - .and_then(|extension| mime_guess::get_mime_type_opt(extension)) + .and_then(|extension| mime_guess::from_ext(extension).first()) } #[cfg(test)]