libimagref: Deny warnings and fix denied warnings

Signed-off-by: Gavin Thomas Claugus <gclaugus@gmail.com>
This commit is contained in:
Gavin Thomas Claugus 2016-07-26 16:34:22 -04:00
parent ee4cc84236
commit 2ccea914dd
4 changed files with 16 additions and 4 deletions

View file

@ -32,7 +32,7 @@ impl RefFlags {
}
/// Alias for `RefFlags::content_hashing()`
pub fn is_often_moving(mut self, b: bool) -> RefFlags {
pub fn is_often_moving(self, b: bool) -> RefFlags {
self.with_content_hashing(b)
}

View file

@ -1,3 +1,17 @@
#![deny(
non_camel_case_types,
non_snake_case,
path_statements,
trivial_numeric_casts,
unstable_features,
unused_allocation,
unused_import_braces,
unused_imports,
unused_mut,
unused_qualifications,
while_true,
)]
#[macro_use] extern crate log;
extern crate crypto;
extern crate itertools;

View file

@ -10,7 +10,6 @@ use libimagerror::trace::trace_error;
use libimagstore::store::Entry;
use libimagstore::store::FileLockEntry;
use libimagerror::into::IntoError;
use libimagentrylist::error::ListError as LE;
use libimagentrylist::error::ListErrorKind as LEK;
use reference::Ref;

View file

@ -6,7 +6,7 @@ use std::ops::Deref;
use std::ops::DerefMut;
use std::collections::BTreeMap;
use std::fs::File;
use std::io::{Read, Write};
use std::io::Read;
use std::fmt::{Display, Error as FmtError, Formatter};
use std::fs::Permissions;
use std::result::Result as RResult;
@ -204,7 +204,6 @@ impl<'a> Ref<'a> {
/// Creates a Hash from a PathBuf by making the PathBuf absolute and then running a hash
/// algorithm on it
fn hash_path(pb: &PathBuf) -> Result<String> {
use std::io::Read;
use crypto::sha1::Sha1;
use crypto::digest::Digest;