@@ -187,7 +187,7 @@ fn generate_snapshot(path: &Path, source_text: &str) -> String {
187187 }
188188
189189 let options = parse_format_options ( & option_json) ;
190- let formatted = normalize_newlines ( format_source ( source_text, source_type, options) ) ;
190+ let formatted = format_source ( source_text, source_type, options) ;
191191 snapshot. push_str ( & formatted) ;
192192 snapshot. push ( '\n' ) ;
193193 }
@@ -199,7 +199,7 @@ fn generate_snapshot(path: &Path, source_text: &str) -> String {
199199
200200/// Helper function to run a test for a single file
201201fn test_file ( path : & Path ) {
202- let source_text = normalize_newlines ( fs:: read_to_string ( path) . unwrap ( ) ) ;
202+ let source_text = fs:: read_to_string ( path) . unwrap ( ) ;
203203 let snapshot = generate_snapshot ( path, & source_text) ;
204204 let snapshot_path = current_dir ( ) . unwrap ( ) . join ( path. parent ( ) . unwrap ( ) ) ;
205205 let snapshot_name = path. file_name ( ) . unwrap ( ) . to_str ( ) . unwrap ( ) ;
@@ -215,14 +215,5 @@ fn test_file(path: &Path) {
215215 } ) ;
216216}
217217
218- #[ expect( clippy:: disallowed_methods) ]
219- fn normalize_newlines ( text : String ) -> String {
220- if !text. contains ( '\r' ) {
221- return text;
222- }
223-
224- text. replace ( "\r \n " , "\n " )
225- }
226-
227218// Include auto-generated test functions from build.rs
228219include ! ( concat!( env!( "OUT_DIR" ) , "/generated_tests.rs" ) ) ;
0 commit comments