@@ -659,7 +659,7 @@ impl LlmClient for OpenAiClient {
659659 // emit it as TextDelta when delta_content is empty (None or "")
660660 let delta_content_empty = delta_content
661661 . as_deref ( )
662- . map_or ( true , str:: is_empty) ;
662+ . is_none_or ( str:: is_empty) ;
663663 if delta_content_empty {
664664 if first_token_ms. is_none ( ) {
665665 first_token_ms = Some (
@@ -679,8 +679,7 @@ impl LlmClient for OpenAiClient {
679679 }
680680 }
681681 }
682- if delta_content. as_deref ( ) . map_or ( true , str:: is_empty)
683- {
682+ if delta_content. as_deref ( ) . is_none_or ( str:: is_empty) {
684683 if let Some ( content) = message
685684 . content
686685 . filter ( |value| !value. is_empty ( ) )
@@ -723,7 +722,7 @@ impl LlmClient for OpenAiClient {
723722 let content_empty = delta
724723 . content
725724 . as_deref ( )
726- . map_or ( true , |s| s. is_empty ( ) ) ;
725+ . is_none_or ( |s| s. is_empty ( ) ) ;
727726 if content_empty {
728727 if first_token_ms. is_none ( ) {
729728 first_token_ms = Some (
@@ -853,7 +852,7 @@ impl LlmClient for OpenAiClient {
853852 if let Some ( reasoning) = message. reasoning_content {
854853 reasoning_content_accum. push_str ( & reasoning) ;
855854 }
856- if delta_content. as_deref ( ) . map_or ( true , str:: is_empty) {
855+ if delta_content. as_deref ( ) . is_none_or ( str:: is_empty) {
857856 if let Some ( content) =
858857 message. content . filter ( |value| !value. is_empty ( ) )
859858 {
@@ -884,7 +883,7 @@ impl LlmClient for OpenAiClient {
884883 // For models like kimi that use reasoning_content for actual text output,
885884 // emit it as TextDelta when content is empty (None or "")
886885 let content_empty =
887- delta. content . as_deref ( ) . map_or ( true , |s| s. is_empty ( ) ) ;
886+ delta. content . as_deref ( ) . is_none_or ( |s| s. is_empty ( ) ) ;
888887 if content_empty {
889888 if first_token_ms. is_none ( ) {
890889 first_token_ms = Some (
0 commit comments