Skip to content

Commit 0de71eb

Browse files
committed
fix bug
1 parent 85a1415 commit 0de71eb

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

spi/spi-conf/src/serv/placehodler.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ enum Segment<'s> {
2222
}
2323

2424
fn parse_content(content: &str) -> Vec<Segment<'_>> {
25-
let mut new_content = String::new();
2625
let matcher = place_holder_regex().find_iter(content);
2726
let mut idx = 0;
2827
let mut result = Vec::new();
@@ -32,7 +31,7 @@ fn parse_content(content: &str) -> Vec<Segment<'_>> {
3231
result.push(Segment::Replace { key });
3332
idx = mat.end();
3433
}
35-
new_content.push_str(&content[idx..]);
34+
result.push_str(Segment::Raw(&content[idx..]));
3635
result
3736
}
3837

0 commit comments

Comments
 (0)