return type
This commit is contained in:
parent
5226edbb0a
commit
480cf472e5
1 changed files with 1 additions and 1 deletions
|
@ -19,7 +19,7 @@ fn get_job_stats(lodestone_ids: &[usize]) -> anyhow::Result<Vec<Vec<JobStats>>>
|
|||
let raw_data = output.stdout.lines();
|
||||
let data: Vec<Result<Vec<JobStats>, _>> = raw_data
|
||||
.map_while(Result::ok)
|
||||
.map(|buf| serde_json::from_str::<Vec<RawJobStats>>(&buf))
|
||||
.map(|buf| -> Result<Vec<RawJobStats>, _> { serde_json::from_str(&buf) })
|
||||
.map_ok(|raw| raw.into_iter().map(|r| r.into()).collect())
|
||||
.map(|stats| stats.map_err(|err| anyhow::anyhow!(err)))
|
||||
.collect();
|
||||
|
|
Loading…
Reference in a new issue