File tree Expand file tree Collapse file tree 1 file changed +12
-17
lines changed
Expand file tree Collapse file tree 1 file changed +12
-17
lines changed Original file line number Diff line number Diff line change @@ -516,23 +516,18 @@ impl CsvBodyRenderer {
516516
517517 if let Some ( obj) = data. as_object ( ) {
518518 self . writer
519- . write_record (
520- self . columns
521- . iter ( )
522- . map ( |s| {
523- let val = obj. get ( s) ;
524- if let Some ( val) = val {
525- if let Some ( s) = val. as_str ( ) {
526- Cow :: Borrowed ( s. as_bytes ( ) )
527- } else {
528- Cow :: Owned ( val. to_string ( ) . into_bytes ( ) )
529- }
530- } else {
531- Cow :: Borrowed ( & b"" [ ..] )
532- }
533- } )
534- . collect :: < Vec < _ > > ( ) ,
535- )
519+ . write_record ( self . columns . iter ( ) . map ( |s| {
520+ let val = obj. get ( s) ;
521+ if let Some ( val) = val {
522+ if let Some ( s) = val. as_str ( ) {
523+ Cow :: Borrowed ( s. as_bytes ( ) )
524+ } else {
525+ Cow :: Owned ( val. to_string ( ) . into_bytes ( ) )
526+ }
527+ } else {
528+ Cow :: Borrowed ( & b"" [ ..] )
529+ }
530+ } ) )
536531 . await ?;
537532 }
538533
You can’t perform that action at this time.
0 commit comments