mirror of
https://github.com/dandavison/delta.git
synced 2026-05-29 11:19:34 +02:00
Fix clippy lints
This commit is contained in:
committed by
Dan Davison
parent
019752a664
commit
9eed967543
@@ -78,7 +78,7 @@ impl<'a> StateMachine<'a> {
|
||||
if matches!(self.state, State::Unknown) {
|
||||
if let Some(lang) = utils::process::git_blame_filename_extension()
|
||||
.as_ref()
|
||||
.or(self.config.default_language.as_ref())
|
||||
.or_else(|| self.config.default_language.as_ref())
|
||||
{
|
||||
self.painter.set_syntax(Some(lang));
|
||||
self.painter.set_highlighter();
|
||||
|
||||
@@ -58,7 +58,7 @@ impl<'a> StateMachine<'a> {
|
||||
// Emit syntax-highlighted code
|
||||
// TODO: Determine the language less frequently, e.g. only when the file changes.
|
||||
if let Some(lang) = handlers::diff_header::get_extension(&grep_line.path)
|
||||
.or(self.config.default_language.as_deref())
|
||||
.or_else(|| self.config.default_language.as_deref())
|
||||
{
|
||||
self.painter.set_syntax(Some(lang));
|
||||
self.painter.set_highlighter();
|
||||
|
||||
Reference in New Issue
Block a user