From 41e4b1a8835422e8ebeed11b54135a9bbbe2c5a9 Mon Sep 17 00:00:00 2001 From: Serial <69764315+Serial-ATA@users.noreply.github.com> Date: Thu, 3 Mar 2022 17:04:34 -0500 Subject: [PATCH] Bump `ogg_pager` --- Cargo.toml | 2 +- src/ogg/vorbis/write.rs | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index ca166b37..455402f6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,7 +17,7 @@ flate2 = { version = "1.0.22", optional = true } # Vorbis comments pictures base64 = { version = "0.13.0", optional = true } # OGG Vorbis/Opus -ogg_pager = "0.3.0" +ogg_pager = "0.3.1" # Key maps once_cell = "1.9.0" paste = "1.0.6" diff --git a/src/ogg/vorbis/write.rs b/src/ogg/vorbis/write.rs index 65c5d20c..ea45fefb 100644 --- a/src/ogg/vorbis/write.rs +++ b/src/ogg/vorbis/write.rs @@ -12,7 +12,7 @@ pub(crate) fn write_to( data: &mut File, writer: &mut Vec, first_md_content: Vec, - mut pages: &mut [Page], + pages: &mut [Page], ) -> Result<()> { let mut remaining = Vec::new(); @@ -85,9 +85,8 @@ pub(crate) fn write_to( // Safe to unwrap, since `pages` is guaranteed to not be empty let (last_page, remaining_pages) = pages.split_last_mut().unwrap(); - pages = remaining_pages; - for p in pages.iter_mut() { + for p in remaining_pages.iter_mut() { p.gen_crc()?; writer.write_all(&*p.as_bytes()?)?; }