File tree Expand file tree Collapse file tree
crates/jcode-import-core/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -359,10 +359,8 @@ pub fn parse_rfc3339_json(value: Option<&serde_json::Value>) -> Option<DateTime<
359359pub fn extract_external_text_from_json ( value : & serde_json:: Value , include_tools : bool ) -> String {
360360 fn visit ( value : & serde_json:: Value , include_tools : bool , out : & mut Vec < String > ) {
361361 match value {
362- serde_json:: Value :: String ( text) => {
363- if !text. trim ( ) . is_empty ( ) {
364- out. push ( text. trim ( ) . to_string ( ) ) ;
365- }
362+ serde_json:: Value :: String ( text) if !text. trim ( ) . is_empty ( ) => {
363+ out. push ( text. trim ( ) . to_string ( ) ) ;
366364 }
367365 serde_json:: Value :: Array ( items) => {
368366 for item in items {
@@ -789,10 +787,8 @@ fn truncate_title_text(text: &str, max_chars: usize) -> String {
789787pub fn extract_text_from_json_value ( value : & serde_json:: Value ) -> String {
790788 fn visit ( value : & serde_json:: Value , out : & mut Vec < String > ) {
791789 match value {
792- serde_json:: Value :: String ( text) => {
793- if !text. trim ( ) . is_empty ( ) {
794- out. push ( text. trim ( ) . to_string ( ) ) ;
795- }
790+ serde_json:: Value :: String ( text) if !text. trim ( ) . is_empty ( ) => {
791+ out. push ( text. trim ( ) . to_string ( ) ) ;
796792 }
797793 serde_json:: Value :: Array ( items) => {
798794 for item in items {
You can’t perform that action at this time.
0 commit comments