Skip to content

Commit 59b7f9c

Browse files
committed
fix: use platform-specific literal newlines
see rust-lang/rust#62865
1 parent 579be6d commit 59b7f9c

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
@@ -1192,7 +1192,7 @@ if True:
11921192
if True:
11931193
pass
11941194
"#
1195-
.trim()
1195+
.trim().replace("\n", LineEnding::default().as_str())
11961196
);
11971197
}
11981198

@@ -1242,7 +1242,7 @@ if True:
12421242
round_trip_with(
12431243
&Indentation::new(" ".to_string()),
12441244
&Quote::default(),
1245-
&LineEnding::default(),
1245+
&LineEnding::LF(),
12461246
r#"
12471247
if True:
12481248
pass
@@ -1253,13 +1253,13 @@ if True:
12531253
if True:
12541254
pass
12551255
"#
1256-
.trim()
1256+
.trim().replace("\n", LineEnding::default().as_str())
12571257
);
12581258
assert_eq!(
12591259
round_trip_with(
12601260
&Indentation::new(" ".to_string()),
12611261
&Quote::default(),
1262-
&LineEnding::default(),
1262+
&LineEnding::LF(),
12631263
r#"
12641264
if True:
12651265
pass
@@ -1270,7 +1270,7 @@ if True:
12701270
if True:
12711271
pass
12721272
"#
1273-
.trim()
1273+
.trim().replace("\n", LineEnding::default().as_str())
12741274
);
12751275
assert_eq!(
12761276
round_trip_with(
@@ -1287,7 +1287,7 @@ if True:
12871287
if True:
12881288
pass
12891289
"#
1290-
.trim()
1290+
.trim().replace("\n", LineEnding::default().as_str())
12911291
);
12921292
}
12931293

0 commit comments

Comments
 (0)