Merge pull request #354 from matthiasbeyer/libimaglink/zero-warnings
Libimaglink/zero warnings
This commit is contained in:
commit
d3b94df8a0
3 changed files with 16 additions and 7 deletions
|
@ -1,8 +1,6 @@
|
||||||
use std::error::Error;
|
use std::error::Error;
|
||||||
use std::fmt::Error as FmtError;
|
use std::fmt::Error as FmtError;
|
||||||
use std::clone::Clone;
|
use std::fmt::{Display, Formatter};
|
||||||
use std::fmt::{Debug, Display, Formatter};
|
|
||||||
use std::fmt;
|
|
||||||
|
|
||||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||||
pub enum LinkErrorKind {
|
pub enum LinkErrorKind {
|
||||||
|
|
|
@ -11,13 +11,11 @@
|
||||||
/// This helps us greatly with deduplication of URLs.
|
/// This helps us greatly with deduplication of URLs.
|
||||||
///
|
///
|
||||||
|
|
||||||
use std::convert::Into;
|
|
||||||
use std::ops::Deref;
|
use std::ops::Deref;
|
||||||
use std::ops::DerefMut;
|
use std::ops::DerefMut;
|
||||||
use std::collections::BTreeMap;
|
use std::collections::BTreeMap;
|
||||||
|
|
||||||
use libimagstore::store::Entry;
|
use libimagstore::store::Entry;
|
||||||
use libimagstore::store::EntryHeader;
|
|
||||||
use libimagstore::store::FileLockEntry;
|
use libimagstore::store::FileLockEntry;
|
||||||
use libimagstore::store::Store;
|
use libimagstore::store::Store;
|
||||||
use libimagstore::storeid::StoreId;
|
use libimagstore::storeid::StoreId;
|
||||||
|
@ -30,7 +28,6 @@ use internal::InternalLinker;
|
||||||
use module_path::ModuleEntryPath;
|
use module_path::ModuleEntryPath;
|
||||||
|
|
||||||
use toml::Value;
|
use toml::Value;
|
||||||
use toml::Table;
|
|
||||||
use url::Url;
|
use url::Url;
|
||||||
use crypto::sha1::Sha1;
|
use crypto::sha1::Sha1;
|
||||||
use crypto::digest::Digest;
|
use crypto::digest::Digest;
|
||||||
|
@ -234,7 +231,7 @@ impl ExternalLinker for Entry {
|
||||||
fn remove_external_link(&mut self, store: &Store, link: Url) -> Result<()> {
|
fn remove_external_link(&mut self, store: &Store, link: Url) -> Result<()> {
|
||||||
// get external links, remove this one, save them
|
// get external links, remove this one, save them
|
||||||
self.get_external_links(store)
|
self.get_external_links(store)
|
||||||
.and_then(|mut links| {
|
.and_then(|links| {
|
||||||
debug!("Removing link = '{:?}' from links = {:?}", link, links);
|
debug!("Removing link = '{:?}' from links = {:?}", link, links);
|
||||||
let links = links.into_iter()
|
let links = links.into_iter()
|
||||||
.filter(|l| l.serialize() != link.serialize())
|
.filter(|l| l.serialize() != link.serialize())
|
||||||
|
|
|
@ -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;
|
extern crate itertools;
|
||||||
#[macro_use] extern crate log;
|
#[macro_use] extern crate log;
|
||||||
extern crate toml;
|
extern crate toml;
|
||||||
|
|
Loading…
Reference in a new issue