Fix warnings: other

This commit is contained in:
Artem Vorotnikov 2020-07-29 18:38:27 +03:00
parent 412d0307cb
commit c270599a23
No known key found for this signature in database
GPG Key ID: E0148C3F2FBB7A20
3 changed files with 5 additions and 3 deletions

View File

@ -14,6 +14,8 @@
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with Parity Ethereum. If not, see <http://www.gnu.org/licenses/>. // along with Parity Ethereum. If not, see <http://www.gnu.org/licenses/>.
#![allow(deprecated)]
use parity_crypto::error::SymmError; use parity_crypto::error::SymmError;
use secp256k1; use secp256k1;
use std::io; use std::io;

View File

@ -16,7 +16,7 @@
use ethereum_types::H256; use ethereum_types::H256;
use jsonrpc_tcp_server::PushMessageError; use jsonrpc_tcp_server::PushMessageError;
use std::{self, error::Error as StdError}; use std;
#[derive(Debug, Clone)] #[derive(Debug, Clone)]
pub enum Error { pub enum Error {
@ -29,7 +29,7 @@ pub enum Error {
impl From<std::io::Error> for Error { impl From<std::io::Error> for Error {
fn from(err: std::io::Error) -> Self { fn from(err: std::io::Error) -> Self {
Error::Io(err.description().to_owned()) Error::Io(err.to_string())
} }
} }

View File

@ -214,7 +214,7 @@ fn guess_mime_type(url: &str) -> Option<Mime> {
} }
} }
url.and_then(|url| url.split('.').last()) 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)] #[cfg(test)]