mirror of
https://github.com/gitui-org/gitui
synced 2026-05-23 17:08: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");
|
||||
let plain_text = || SYNTAX_SET.find_syntax_plain_text();
|
||||
let syntax = SYNTAX_SET
|
||||
.find_syntax_for_file(
|
||||
file_path.to_str().unwrap_or_default(),
|
||||
)
|
||||
.find_syntax_for_file(file_path)
|
||||
.unwrap_or_else(|e| {
|
||||
log::error!("Could not read the file to detect its syntax: {e}");
|
||||
Some(plain_text())
|
||||
|
|
|
|||
Loading…
Reference in a new issue