Skip to content

Commit

Permalink
Remove unnecessary map_err calls
Browse files Browse the repository at this point in the history
  • Loading branch information
andybalaam committed Feb 21, 2024
1 parent 50b8079 commit 0861298
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/machine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1585,11 +1585,11 @@ where
{
let mut stream_json = vec![];
let mut ser = serde_json::Serializer::new(&mut stream_json);
let mut seq = ser.serialize_seq(None).map_err(|e| anyhow::Error::msg(e.to_string()))?;
let mut seq = ser.serialize_seq(None)?;
while let Some(key) = stream.next().await {
seq.serialize_element(&key).map_err(|e| anyhow::Error::msg(e.to_string()))?;
seq.serialize_element(&key)?;
}
seq.end().map_err(|e| anyhow::Error::msg(e.to_string()))?;
seq.end()?;

Ok(String::from_utf8(stream_json)?)
}

0 comments on commit 0861298

Please sign in to comment.