mirror of
https://github.com/gitui-org/gitui
synced 2026-05-24 09:28:21 +00:00
Remove redundant to_str() conversion (#2527)
This commit is contained in:
parent
e611e79274
commit
7f30be88e3
1 changed files with 1 additions and 3 deletions
|
|
@ -76,9 +76,7 @@ impl SyntaxText {
|
||||||
scope_time!("syntax_highlighting.0");
|
scope_time!("syntax_highlighting.0");
|
||||||
let plain_text = || SYNTAX_SET.find_syntax_plain_text();
|
let plain_text = || SYNTAX_SET.find_syntax_plain_text();
|
||||||
let syntax = SYNTAX_SET
|
let syntax = SYNTAX_SET
|
||||||
.find_syntax_for_file(
|
.find_syntax_for_file(file_path)
|
||||||
file_path.to_str().unwrap_or_default(),
|
|
||||||
)
|
|
||||||
.unwrap_or_else(|e| {
|
.unwrap_or_else(|e| {
|
||||||
log::error!("Could not read the file to detect its syntax: {e}");
|
log::error!("Could not read the file to detect its syntax: {e}");
|
||||||
Some(plain_text())
|
Some(plain_text())
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue