Skip to content

Commit a00d0ba

Browse files
committed
refactor(embedded): Name the steps when trimming
1 parent 544013e commit a00d0ba

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/cargo/util/toml/embedded.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -150,13 +150,12 @@ impl<'s> ScriptSource<'s> {
150150

151151
let mut rest = source.content;
152152
while !rest.is_empty() {
153-
let c = rest;
154-
let c = c.trim_start_matches([' ', '\t']);
155-
let c = c.trim_start_matches(['\r', '\n']);
156-
if c == rest {
153+
let without_spaces = rest.trim_start_matches([' ', '\t']);
154+
let without_nl = without_spaces.trim_start_matches(['\r', '\n']);
155+
if without_nl == rest {
157156
break;
158157
}
159-
rest = c;
158+
rest = without_nl;
160159
}
161160
let fence_end = rest
162161
.char_indices()

0 commit comments

Comments
 (0)