File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
src/tools/generate-copyright/src Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -57,6 +57,10 @@ fn main() -> Result<(), Error> {
5757 dependencies : collected_cargo_metadata,
5858 } ;
5959 let output = template. render ( ) ?;
60+ // Git stores text files with \n, but this file may contain \r\n in files
61+ // copied from dependencies. Normalise them before we write them out, for
62+ // consistency.
63+ let output = output. replace ( "\r \n " , "\n " ) ;
6064 std:: fs:: write ( & dest_file, output) ?;
6165
6266 // Output libstd subset file
@@ -65,6 +69,10 @@ fn main() -> Result<(), Error> {
6569 dependencies : library_collected_cargo_metadata,
6670 } ;
6771 let output = template. render ( ) ?;
72+ // Git stores text files with \n, but this file may contain \r\n in files
73+ // copied from dependencies. Normalise them before we write them out, for
74+ // consistency.
75+ let output = output. replace ( "\r \n " , "\n " ) ;
6876 std:: fs:: write ( & libstd_dest_file, output) ?;
6977
7078 Ok ( ( ) )
You can’t perform that action at this time.
0 commit comments