@@ -92,7 +92,7 @@ fn process_lib_rs_content(initial_content: &str, mod_name: &str) -> String {
9292 // Keep config lines (e.g. `#![allow(clippy::new_without_default)]`) on top of the file
9393 trimmed_line if trimmed_line. starts_with ( "#!" ) => {
9494 pre_code_injection_text. push_str ( trimmed_line) ;
95- pre_code_injection_text. push_str ( " \n " ) ;
95+ pre_code_injection_text. push ( '\n' ) ;
9696 last_line_was_empty = false ;
9797 }
9898 trimmed_line if trimmed_line == legacy_frb_injected_code => {
@@ -351,7 +351,7 @@ mod tests {
351351 // END of AUTO INJECTED code\n \
352352 pub mod api;\n "
353353 ) ;
354- let result_content = process_lib_rs_content ( & initial_content, mod_name) ;
354+ let _ = process_lib_rs_content ( & initial_content, mod_name) ;
355355 }
356356
357357 #[ test]
@@ -491,8 +491,7 @@ mod tests {
491491 let initial_content = "
492492 #![allow(clippy::new_without_default)]
493493 pub mod app;
494- mod frb_generated;
495- \n "
494+ "
496495 . to_string ( ) ;
497496 let result_content = process_lib_rs_content ( & initial_content, mod_name) ;
498497 let expected_code = format ! (
@@ -505,8 +504,7 @@ mod tests {
505504 pub use crate::frb_generated::StreamSink as __FrbStreamSinkForLogging;\n \
506505 // END of AUTO INJECTED code\n \
507506 \n \
508- pub mod app;\n \
509- mod frb_generated;\n "
507+ pub mod app;\n "
510508 ) ;
511509 assert_eq ! ( result_content, expected_code) ;
512510 }
0 commit comments