Skip to content

Commit 8c88f23

Browse files
committed
refactor(toml): Remove 'tick' language
We've switched to dashes
1 parent c88c789 commit 8c88f23

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

src/cargo/util/toml/embedded.rs

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -225,21 +225,23 @@ fn split_source(input: &str) -> CargoResult<Source<'_>> {
225225
}
226226

227227
// Experiment: let us try which char works better
228-
let tick_char = '-';
228+
let fence_char = '-';
229229

230-
let tick_end = source
230+
let fence_end = source
231231
.content
232232
.char_indices()
233-
.find_map(|(i, c)| (c != tick_char).then_some(i))
233+
.find_map(|(i, c)| (c != fence_char).then_some(i))
234234
.unwrap_or(source.content.len());
235-
let (fence_pattern, rest) = match tick_end {
235+
let (fence_pattern, rest) = match fence_end {
236236
0 => {
237237
return Ok(source);
238238
}
239239
1 | 2 => {
240-
anyhow::bail!("found {tick_end} `{tick_char}` in rust frontmatter, expected at least 3")
240+
anyhow::bail!(
241+
"found {fence_end} `{fence_char}` in rust frontmatter, expected at least 3"
242+
)
241243
}
242-
_ => source.content.split_at(tick_end),
244+
_ => source.content.split_at(fence_end),
243245
};
244246
let (info, content) = rest.split_once("\n").unwrap_or((rest, ""));
245247
if !info.is_empty() {

0 commit comments

Comments
 (0)