return type

main
Zynh0722 2024-02-25 15:40:57 -08:00
parent 5226edbb0a
commit 480cf472e5
1 changed files with 1 additions and 1 deletions

View File

@ -19,7 +19,7 @@ fn get_job_stats(lodestone_ids: &[usize]) -> anyhow::Result<Vec<Vec<JobStats>>>
let raw_data = output.stdout.lines(); let raw_data = output.stdout.lines();
let data: Vec<Result<Vec<JobStats>, _>> = raw_data let data: Vec<Result<Vec<JobStats>, _>> = raw_data
.map_while(Result::ok) .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_ok(|raw| raw.into_iter().map(|r| r.into()).collect())
.map(|stats| stats.map_err(|err| anyhow::anyhow!(err))) .map(|stats| stats.map_err(|err| anyhow::anyhow!(err)))
.collect(); .collect();