mirror of
https://github.com/emilk/egui.git
synced 2026-08-30 05:10:03 -04:00
misc clippy fixes from 1.60.0
This commit is contained in:
@@ -404,7 +404,7 @@ impl Highlighter {
|
||||
|
||||
while !text.is_empty() {
|
||||
if text.starts_with("//") {
|
||||
let end = text.find('\n').unwrap_or_else(|| text.len());
|
||||
let end = text.find('\n').unwrap_or(text.len());
|
||||
job.append(&text[..end], 0.0, theme.formats[TokenType::Comment].clone());
|
||||
text = &text[end..];
|
||||
} else if text.starts_with('"') {
|
||||
@@ -412,7 +412,7 @@ impl Highlighter {
|
||||
.find('"')
|
||||
.map(|i| i + 2)
|
||||
.or_else(|| text.find('\n'))
|
||||
.unwrap_or_else(|| text.len());
|
||||
.unwrap_or(text.len());
|
||||
job.append(
|
||||
&text[..end],
|
||||
0.0,
|
||||
|
||||
Reference in New Issue
Block a user