From 7d26720e791c9e1364d50360aa638f61fb391fd8 Mon Sep 17 00:00:00 2001 From: Christian Ebner Date: Tue, 20 Aug 2019 13:40:17 +0200 Subject: [PATCH] src/pxar/decoder.rs: move GOODBYE_ITEM_SIZE from function to module scope. Signed-off-by: Christian Ebner Signed-off-by: Wolfgang Bumiller --- src/pxar/decoder.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/pxar/decoder.rs b/src/pxar/decoder.rs index f3e647bc..e7e2713a 100644 --- a/src/pxar/decoder.rs +++ b/src/pxar/decoder.rs @@ -28,6 +28,7 @@ pub struct Decoder Result<(), Error>> { } const HEADER_SIZE: u64 = std::mem::size_of::() as u64; +const GOODBYE_ITEM_SIZE: u64 = std::mem::size_of::() as u64; impl Result<(), Error>> Decoder { @@ -104,8 +105,6 @@ impl Result<(), Error>> Decoder { pub fn list_dir(&mut self, dir: &DirectoryEntry) -> Result, Error> { - const GOODBYE_ITEM_SIZE: u64 = std::mem::size_of::() as u64; - let start = dir.start; let end = dir.end;