Merge pull request #354 from matthiasbeyer/libimaglink/zero-warnings

Libimaglink/zero warnings
This commit is contained in:
Matthias Beyer 2016-04-17 00:14:51 +02:00
commit d3b94df8a0
3 changed files with 16 additions and 7 deletions

View file

@ -1,8 +1,6 @@
use std::error::Error;
use std::fmt::Error as FmtError;
use std::clone::Clone;
use std::fmt::{Debug, Display, Formatter};
use std::fmt;
use std::fmt::{Display, Formatter};
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum LinkErrorKind {

View file

@ -11,13 +11,11 @@
/// This helps us greatly with deduplication of URLs.
///
use std::convert::Into;
use std::ops::Deref;
use std::ops::DerefMut;
use std::collections::BTreeMap;
use libimagstore::store::Entry;
use libimagstore::store::EntryHeader;
use libimagstore::store::FileLockEntry;
use libimagstore::store::Store;
use libimagstore::storeid::StoreId;
@ -30,7 +28,6 @@ use internal::InternalLinker;
use module_path::ModuleEntryPath;
use toml::Value;
use toml::Table;
use url::Url;
use crypto::sha1::Sha1;
use crypto::digest::Digest;
@ -234,7 +231,7 @@ impl ExternalLinker for Entry {
fn remove_external_link(&mut self, store: &Store, link: Url) -> Result<()> {
// get external links, remove this one, save them
self.get_external_links(store)
.and_then(|mut links| {
.and_then(|links| {
debug!("Removing link = '{:?}' from links = {:?}", link, links);
let links = links.into_iter()
.filter(|l| l.serialize() != link.serialize())

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,
)]
extern crate itertools;
#[macro_use] extern crate log;
extern crate toml;