Added warning on unused lifetimes, fixed warnings
This commit is contained in:
parent
e232454936
commit
4807ea6be2
|
|
@ -134,7 +134,7 @@
|
||||||
"uses": "actions-rs/cargo@v1",
|
"uses": "actions-rs/cargo@v1",
|
||||||
"with": {
|
"with": {
|
||||||
"command": "clippy",
|
"command": "clippy",
|
||||||
"args": "-- -D warnings"
|
"args": "--all-features -- -D warnings"
|
||||||
},
|
},
|
||||||
"name": "Run `cargo clippy`"
|
"name": "Run `cargo clippy`"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ pub struct DecoderImpl<R, C: Config> {
|
||||||
config: C,
|
config: C,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'de, R: Reader, C: Config> DecoderImpl<R, C> {
|
impl<R: Reader, C: Config> DecoderImpl<R, C> {
|
||||||
/// Construct a new Decoder
|
/// Construct a new Decoder
|
||||||
pub fn new(reader: R, config: C) -> DecoderImpl<R, C> {
|
pub fn new(reader: R, config: C) -> DecoderImpl<R, C> {
|
||||||
DecoderImpl { reader, config }
|
DecoderImpl { reader, config }
|
||||||
|
|
@ -44,7 +44,7 @@ impl<'a, 'de, R: BorrowReader<'de>, C: Config> BorrowDecoder<'de> for &'a mut De
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a, 'de, R: Reader, C: Config> Decoder for &'a mut DecoderImpl<R, C> {
|
impl<'a, R: Reader, C: Config> Decoder for &'a mut DecoderImpl<R, C> {
|
||||||
type R = R;
|
type R = R;
|
||||||
|
|
||||||
type C = C;
|
type C = C;
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,7 @@ pub trait BorrowDecoder<'de>: Decoder {
|
||||||
fn borrow_reader(&mut self) -> &mut Self::BR;
|
fn borrow_reader(&mut self) -> &mut Self::BR;
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a, 'de, T> Decoder for &'a mut T
|
impl<'a, T> Decoder for &'a mut T
|
||||||
where
|
where
|
||||||
T: Decoder,
|
T: Decoder,
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,7 @@ pub trait Encoder: sealed::Sealed {
|
||||||
fn config(&self) -> &Self::C;
|
fn config(&self) -> &Self::C;
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a, 'de, T> Encoder for &'a mut T
|
impl<'a, T> Encoder for &'a mut T
|
||||||
where
|
where
|
||||||
T: Encoder,
|
T: Encoder,
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ pub fn decode_from_with_config<D: Decode, C: Config, R: std::io::Read>(
|
||||||
D::decode(&mut decoder)
|
D::decode(&mut decoder)
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'storage, R: std::io::Read> Reader for R {
|
impl<R: std::io::Read> Reader for R {
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
fn read(&mut self, bytes: &mut [u8]) -> Result<(), DecodeError> {
|
fn read(&mut self, bytes: &mut [u8]) -> Result<(), DecodeError> {
|
||||||
match self.read_exact(bytes) {
|
match self.read_exact(bytes) {
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
#![no_std]
|
#![no_std]
|
||||||
#![warn(missing_docs)]
|
#![warn(missing_docs, unused_lifetimes)]
|
||||||
#![cfg_attr(docsrs, feature(doc_cfg))]
|
#![cfg_attr(docsrs, feature(doc_cfg))]
|
||||||
|
|
||||||
//! Bincode is a crate for encoding and decoding using a tiny binary
|
//! Bincode is a crate for encoding and decoding using a tiny binary
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue