Clippy: Apply new nightly lints

This commit is contained in:
Serial 2022-11-24 15:07:48 -05:00 committed by Alex
parent 0928730c14
commit 1a866c0c32
4 changed files with 8 additions and 10 deletions

View file

@ -6,9 +6,9 @@ use std::io::Write;
use byteorder::{BigEndian, WriteBytesExt};
pub(in crate::id3::v2) fn create_items<'a, W>(
pub(in crate::id3::v2) fn create_items<W>(
writer: &mut W,
frames: &mut dyn Iterator<Item = FrameRef<'a>>,
frames: &mut dyn Iterator<Item = FrameRef<'_>>,
) -> Result<()>
where
W: Write,

View file

@ -140,7 +140,7 @@
clippy::module_name_repetitions,
clippy::must_use_candidate,
clippy::doc_markdown,
clippy::let_underscore_drop,
let_underscore_drop,
clippy::match_wildcard_for_single_variants,
clippy::semicolon_if_nothing_returned,
clippy::new_without_default,
@ -157,6 +157,7 @@
clippy::return_self_not_must_use,
clippy::bool_to_int_with_if,
clippy::uninlined_format_args, /* This should be changed for any normal "{}", but I'm not a fan of it for any debug or width specific formatting */
clippy::manual_let_else,
)]
#![cfg_attr(docsrs, feature(doc_auto_cfg))]

View file

@ -341,12 +341,9 @@ where
let size = writer.get_ref().len();
write_size(
writer.seek(SeekFrom::Start(0))?,
size as u64,
false,
&mut writer,
)?;
writer.rewind()?;
write_size(0, size as u64, false, &mut writer)?;
Ok(writer.into_inner())
}

View file

@ -640,7 +640,7 @@ fn mdat_length<R>(reader: &mut AtomReader<R>) -> Result<u64>
where
R: Read + Seek,
{
reader.seek(SeekFrom::Start(0))?;
reader.rewind()?;
while let Ok(atom) = reader.next() {
if atom.ident == AtomIdent::Fourcc(*b"mdat") {