From 8e931cd79f000d2b9f6826c38ed11e79635fd9cd Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Sun, 28 Jan 2018 21:24:02 +0100 Subject: [PATCH] Change calls to into_get_iter() to not take argument --- bin/core/imag-diagnostics/src/main.rs | 2 +- bin/core/imag-grep/src/main.rs | 3 +-- lib/core/libimagstore/src/iter.rs | 9 ++------- lib/entry/libimagentrylink/src/internal.rs | 3 +-- 4 files changed, 5 insertions(+), 12 deletions(-) diff --git a/bin/core/imag-diagnostics/src/main.rs b/bin/core/imag-diagnostics/src/main.rs index 391bcfa1..3f746cb1 100644 --- a/bin/core/imag-diagnostics/src/main.rs +++ b/bin/core/imag-diagnostics/src/main.rs @@ -100,7 +100,7 @@ fn main() { let diags = rt.store() .entries() .map_err_trace_exit_unwrap(1) - .into_get_iter(rt.store()) + .into_get_iter() .map(|e| { e.map_err_trace_exit_unwrap(1) .ok_or(Error::from("Unable to get entry".to_owned())) diff --git a/bin/core/imag-grep/src/main.rs b/bin/core/imag-grep/src/main.rs index 6e92b601..e51f1cf5 100644 --- a/bin/core/imag-grep/src/main.rs +++ b/bin/core/imag-grep/src/main.rs @@ -42,7 +42,6 @@ extern crate libimagerror; use regex::Regex; use libimagrt::setup::generate_runtime_setup; -use libimagstore::iter::get::StoreIdGetIteratorExtension; use libimagstore::store::Entry; use libimagerror::trace::MapErrTrace; @@ -77,7 +76,7 @@ fn main() { .store() .entries() .map_err_trace_exit_unwrap(1) - .into_get_iter(rt.store()) + .into_get_iter() .filter_map(|res| res.map_err_trace_exit_unwrap(1)) .filter(|entry| pattern.is_match(entry.get_content())) .map(|entry| show(&entry, &pattern, &opts, &mut count)) diff --git a/lib/core/libimagstore/src/iter.rs b/lib/core/libimagstore/src/iter.rs index 67c0f0ba..460ebf0e 100644 --- a/lib/core/libimagstore/src/iter.rs +++ b/lib/core/libimagstore/src/iter.rs @@ -202,18 +202,14 @@ mod compile_test { } fn test_compile_get() { - use super::get::StoreIdGetIteratorExtension; - let store = store(); let _ = store .entries() .unwrap() - .into_get_iter(&store); + .into_get_iter(); } fn test_compile_get_result() { - use super::get::StoreIdGetResultIteratorExtension; - fn to_result(e: StoreId) -> Result { Ok(e) } @@ -222,8 +218,7 @@ mod compile_test { let _ = store .entries() .unwrap() - .map(to_result) - .into_get_iter(&store); + .into_get_iter(); } } diff --git a/lib/entry/libimagentrylink/src/internal.rs b/lib/entry/libimagentrylink/src/internal.rs index d7cddb69..371419cb 100644 --- a/lib/entry/libimagentrylink/src/internal.rs +++ b/lib/entry/libimagentrylink/src/internal.rs @@ -616,7 +616,6 @@ pub mod store_check { use internal::InternalLinker; use libimagstore::storeid::StoreId; - use libimagstore::iter::get::StoreIdGetIteratorExtension; use libimagutil::debug_result::DebugResult; // Helper data structure to collect incoming and outgoing links for each StoreId @@ -636,7 +635,7 @@ pub mod store_check { let aggregate_link_network = |store: &Store| -> Result> { store .entries()? - .into_get_iter(store) + .into_get_iter() .fold(Ok(HashMap::new()), |map, element| { map.and_then(|mut map| { debug!("Checking element = {:?}", element);