@@ -338,23 +338,23 @@ pub fn multipart_field_module() -> Result<Module> {
338338 let code = unit ( )
339339 + line ( unit ( ) + "pub trait MultipartField {" )
340340 + indented (
341- unit ( )
342- + line ( "fn to_multipart_field(&self) -> String;" )
343- + line ( "fn mime_type(&self) -> &'static str;" ) ,
344- )
341+ unit ( )
342+ + line ( "fn to_multipart_field(&self) -> String;" )
343+ + line ( "fn mime_type(&self) -> &'static str;" ) ,
344+ )
345345 + line ( unit ( ) + "}" )
346346 + NewLine
347347 + line ( unit ( ) + "impl<T: std::fmt::Display> MultipartField for T {" )
348348 + indented (
349- unit ( )
350- + line ( "fn to_multipart_field(&self) -> String {" )
351- + indented ( line ( "self.to_string()" ) )
352- + line ( "}" )
353- + NewLine
354- + line ( unit ( ) + "fn mime_type(&self) -> &'static str {" )
355- + indented ( line ( r#""text/plain; charset=utf-8""# ) )
356- + line ( unit ( ) + "}" ) ,
357- )
349+ unit ( )
350+ + line ( "fn to_multipart_field(&self) -> String {" )
351+ + indented ( line ( "self.to_string()" ) )
352+ + line ( "}" )
353+ + NewLine
354+ + line ( unit ( ) + "fn mime_type(&self) -> &'static str {" )
355+ + indented ( line ( r#""text/plain; charset=utf-8""# ) )
356+ + line ( unit ( ) + "}" ) ,
357+ )
358358 + line ( "}" ) ;
359359
360360 Ok ( Module {
@@ -521,30 +521,30 @@ pub fn model_gen(
521521 + derive_line ( )
522522 + line ( unit ( ) + "pub struct " + & name + " {" )
523523 + indented (
524- fields
525- . into_iter ( )
526- . reduce ( |acc, e| acc + e)
527- . unwrap_or_else ( unit) ,
528- )
524+ fields
525+ . into_iter ( )
526+ . reduce ( |acc, e| acc + e)
527+ . unwrap_or_else ( unit) ,
528+ )
529529 + line ( unit ( ) + "}" )
530530 + NewLine
531531 + line (
532- unit ( )
533- + "impl "
534- + rust_name ( "crate::model" , "MultipartField" )
535- + " for "
536- + & name
537- + "{" ,
538- )
532+ unit ( )
533+ + "impl "
534+ + rust_name ( "crate::model" , "MultipartField" )
535+ + " for "
536+ + & name
537+ + "{" ,
538+ )
539539 + indented (
540- line ( unit ( ) + "fn to_multipart_field(&self) -> String {" )
541- + indented ( line ( "serde_json::to_string(self).unwrap()" ) )
542- + line ( "}" )
543- + NewLine
544- + line ( unit ( ) + "fn mime_type(&self) -> &'static str {" )
545- + indented ( line ( r#""application/json""# ) )
546- + line ( "}" ) ,
547- )
540+ line ( unit ( ) + "fn to_multipart_field(&self) -> String {" )
541+ + indented ( line ( "serde_json::to_string(self).unwrap()" ) )
542+ + line ( "}" )
543+ + NewLine
544+ + line ( unit ( ) + "fn mime_type(&self) -> &'static str {" )
545+ + indented ( line ( r#""application/json""# ) )
546+ + line ( "}" ) ,
547+ )
548548 + line ( "}" ) ;
549549
550550 Ok ( code)
0 commit comments