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,