diff --git a/imag-store/src/create.rs b/imag-store/src/create.rs index 52c105b0..fc33c9ee 100644 --- a/imag-store/src/create.rs +++ b/imag-store/src/create.rs @@ -85,8 +85,8 @@ fn create_from_cli_spec(rt: &Runtime, matches: &ArgMatches, path: &PathBuf) -> R fn create_from_source(rt: &Runtime, matches: &ArgMatches, path: &PathBuf) -> Result<()> { let content = matches .value_of("from-raw") - .ok_or_else(|| StoreError::new(StoreErrorKind::NoCommandlineCall, None)) - .map(|raw_src| string_from_raw_src(raw_src)); + .ok_or(StoreError::new(StoreErrorKind::NoCommandlineCall, None)) + .map(string_from_raw_src); if content.is_err() { return content.map(|_| ()); diff --git a/libimagentrytag/src/util.rs b/libimagentrytag/src/util.rs index 42765193..16b76a1d 100644 --- a/libimagentrytag/src/util.rs +++ b/libimagentrytag/src/util.rs @@ -1,5 +1,5 @@ use regex::Regex; pub fn is_tag(s: &str) -> bool { - Regex::new("^[a-zA-Z]([a-zA-Z0-9_-]*)$").unwrap().captures(&s[..]).is_some() + Regex::new("^[a-zA-Z]([a-zA-Z0-9_-]*)$").unwrap().captures(s).is_some() } diff --git a/libimagstore/src/store.rs b/libimagstore/src/store.rs index b93696eb..ed945a7f 100644 --- a/libimagstore/src/store.rs +++ b/libimagstore/src/store.rs @@ -7,7 +7,6 @@ use std::sync::Arc; use std::sync::RwLock; use std::collections::BTreeMap; use std::io::{Seek, SeekFrom}; -use std::io::Write; use std::convert::From; use std::convert::Into; use std::sync::Mutex; @@ -30,7 +29,6 @@ use lazyfile::LazyFile; use hook::aspect::Aspect; use hook::accessor::{ MutableHookDataAccessor, - NonMutableHookDataAccessor, StoreIdAccessor}; use hook::position::HookPosition; use hook::Hook;