From 5082fee0838d135d6c2d614a84a57e1df145f437 Mon Sep 17 00:00:00 2001 From: Joshua Goins Date: Tue, 25 Oct 2022 14:00:04 -0400 Subject: [PATCH] Fix some small warnings --- src/fiin.rs | 3 +-- src/repository.rs | 1 - src/sha1.rs | 7 ------- 3 files changed, 1 insertion(+), 10 deletions(-) diff --git a/src/fiin.rs b/src/fiin.rs index fe04376..91a75f6 100644 --- a/src/fiin.rs +++ b/src/fiin.rs @@ -1,8 +1,7 @@ use crate::gamedata::MemoryBuffer; use crate::sha1::Sha1; use binrw::BinRead; -use binrw::{binrw, BinrwNamedArgs, NullString}; -use std::ffi::CStr; +use binrw::binrw; use std::fs::read; use std::io::Cursor; diff --git a/src/repository.rs b/src/repository.rs index 226eb6d..31a05e6 100755 --- a/src/repository.rs +++ b/src/repository.rs @@ -2,7 +2,6 @@ use crate::common::read_version; use crate::repository::RepositoryType::{Base, Expansion}; use std::cmp::Ordering; use std::cmp::Ordering::{Greater, Less}; -use std::fs; use std::path::{Path, PathBuf}; /// The type of repository, discerning game data from expansion data. diff --git a/src/sha1.rs b/src/sha1.rs index 43671b7..d92543c 100644 --- a/src/sha1.rs +++ b/src/sha1.rs @@ -241,13 +241,6 @@ impl Sha1 { rv } - /// Resets the hash object to it's initial state. - pub fn reset(&mut self) { - self.state = DEFAULT_STATE; - self.len = 0; - self.blocks.len = 0; - } - /// Update hash with input data. pub fn update(&mut self, data: &[u8]) { let len = &mut self.len;