mirror of
https://github.com/katanemo/plano.git
synced 2026-06-17 15:25:17 +02:00
fix: use if let instead of is_some + unwrap to satisfy clippy
This commit is contained in:
parent
a278e67d9a
commit
fa27ffd699
1 changed files with 1 additions and 2 deletions
|
|
@ -327,8 +327,7 @@ impl TryFrom<(SseEvent, &SupportedAPIsFromClient, &SupportedUpstreamAPIs)> for S
|
|||
}
|
||||
|
||||
// If has data, parse the data as a provider stream response (business logic layer)
|
||||
if transformed_event.data.is_some() {
|
||||
let data_str = transformed_event.data.as_ref().unwrap();
|
||||
if let Some(data_str) = &transformed_event.data {
|
||||
let data_bytes = data_str.as_bytes();
|
||||
let transformed_response: ProviderStreamResponseType =
|
||||
ProviderStreamResponseType::try_from((data_bytes, client_api, upstream_api))?;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue