From 048f09bd14d1c19a276f07e83ec1cc647df2c74a Mon Sep 17 00:00:00 2001 From: Luro02 <24826124+Luro02@users.noreply.github.com> Date: Sun, 26 Jan 2020 13:12:19 +0100 Subject: [PATCH] minor improvements --- examples/parse.rs | 3 --- src/error.rs | 2 +- src/lib.rs | 2 +- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/examples/parse.rs b/examples/parse.rs index 226a22d..16c960b 100644 --- a/examples/parse.rs +++ b/examples/parse.rs @@ -1,6 +1,3 @@ -extern crate clap; -extern crate hls_m3u8; - use clap::{App, Arg}; use hls_m3u8::{MasterPlaylist, MediaPlaylist}; use std::io::{self, Read}; diff --git a/src/error.rs b/src/error.rs index 1333ce5..2cf9a75 100644 --- a/src/error.rs +++ b/src/error.rs @@ -101,7 +101,7 @@ impl fmt::Display for Error { } impl Error { - fn new(inner: ErrorKind) -> Self { Self { inner } } + const fn new(inner: ErrorKind) -> Self { Self { inner } } pub(crate) fn custom(value: T) -> Self { Self::new(ErrorKind::Custom(value.to_string())) diff --git a/src/lib.rs b/src/lib.rs index 3d4b2be..45b1bc5 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -4,7 +4,7 @@ clippy::nursery, clippy::cargo )] -#![allow(clippy::multiple_crate_versions)] +#![allow(clippy::multiple_crate_versions, clippy::must_use_candidate)] #![warn( missing_docs, missing_copy_implementations,