Skip to content

Commit cf39830

Browse files
authored
fix: use platform-specific literal newlines
see rust-lang/rust#62865
1 parent f0ff0bf commit cf39830

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/source_code/generator.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1102,7 +1102,7 @@ if True:
11021102
if True:
11031103
pass
11041104
"#
1105-
.trim()
1105+
.trim().replace("\n", LineEnding::default().as_str())
11061106
);
11071107
}
11081108

@@ -1152,7 +1152,7 @@ if True:
11521152
round_trip_with(
11531153
&Indentation::new(" ".to_string()),
11541154
&Quote::default(),
1155-
&LineEnding::default(),
1155+
&LineEnding::LF(),
11561156
r#"
11571157
if True:
11581158
pass
@@ -1163,13 +1163,13 @@ if True:
11631163
if True:
11641164
pass
11651165
"#
1166-
.trim()
1166+
.trim().replace("\n", LineEnding::default().as_str())
11671167
);
11681168
assert_eq!(
11691169
round_trip_with(
11701170
&Indentation::new(" ".to_string()),
11711171
&Quote::default(),
1172-
&LineEnding::default(),
1172+
&LineEnding::LF(),
11731173
r#"
11741174
if True:
11751175
pass
@@ -1180,7 +1180,7 @@ if True:
11801180
if True:
11811181
pass
11821182
"#
1183-
.trim()
1183+
.trim().replace("\n", LineEnding::default().as_str())
11841184
);
11851185
assert_eq!(
11861186
round_trip_with(
@@ -1197,7 +1197,7 @@ if True:
11971197
if True:
11981198
pass
11991199
"#
1200-
.trim()
1200+
.trim().replace("\n", LineEnding::default().as_str())
12011201
);
12021202
}
12031203

0 commit comments

Comments
 (0)