Try parse into posts and then unwrap

This commit is contained in:
Leon Grünewald 2024-01-01 21:50:57 +01:00
parent 0c882667dc
commit 5673373a7f

View file

@ -77,7 +77,7 @@ impl<'a> Client<'a> {
debug_file.write_all(text.as_bytes())?; debug_file.write_all(text.as_bytes())?;
*/ */
Ok(serde_json::from_str(text.as_str())?) Ok(serde_json::from_str::<Posts>(text.as_str())?.into())
} }
} }