Change calls to into_get_iter() to not take argument

This commit is contained in:
Matthias Beyer 2018-01-28 21:24:02 +01:00
parent 3b01a9eb2f
commit 8e931cd79f
4 changed files with 5 additions and 12 deletions

View file

@ -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()))

View file

@ -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))

View file

@ -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<StoreId, ()> {
Ok(e)
}
@ -222,8 +218,7 @@ mod compile_test {
let _ = store
.entries()
.unwrap()
.map(to_result)
.into_get_iter(&store);
.into_get_iter();
}
}

View file

@ -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<HashMap<StoreId, Linking>> {
store
.entries()?
.into_get_iter(store)
.into_get_iter()
.fold(Ok(HashMap::new()), |map, element| {
map.and_then(|mut map| {
debug!("Checking element = {:?}", element);