mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-29 14:54:47 +00:00
fix clippy
This commit is contained in:
parent
e7c93bad75
commit
ebff47a2aa
1 changed files with 2 additions and 2 deletions
|
@ -22,10 +22,10 @@ pub fn highlight(code: &str) -> Vec<String> {
|
||||||
// Special-case that even though it's normally not a valid highlight.
|
// Special-case that even though it's normally not a valid highlight.
|
||||||
const REPL_PROMPT: &str = "»";
|
const REPL_PROMPT: &str = "»";
|
||||||
|
|
||||||
let code = if code.starts_with(REPL_PROMPT) {
|
let code = if let Some(stripped) = code.strip_prefix(REPL_PROMPT) {
|
||||||
buf = push_html_span(buf, REPL_PROMPT, "kw");
|
buf = push_html_span(buf, REPL_PROMPT, "kw");
|
||||||
|
|
||||||
&code[REPL_PROMPT.len()..]
|
stripped
|
||||||
} else {
|
} else {
|
||||||
code
|
code
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue