chore: Fix clippy::needless_borrow up to an editor

This commit is contained in:
Piotr Osiewicz
2024-01-21 15:03:24 +01:00
parent c3102feeeb
commit 6c82380232
29 changed files with 86 additions and 88 deletions
@@ -134,7 +134,7 @@ pub async fn stream_completion(
line: Result<String, io::Error>,
) -> Result<Option<OpenAIResponseStreamEvent>> {
if let Some(data) = line?.strip_prefix("data: ") {
let event = serde_json::from_str(&data)?;
let event = serde_json::from_str(data)?;
Ok(Some(event))
} else {
Ok(None)