Skip to content

Commit 7f30be8

Browse files
authored
Remove redundant to_str() conversion (gitui-org#2527)
1 parent e611e79 commit 7f30be8

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/ui/syntax_text.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,7 @@ impl SyntaxText {
7676
scope_time!("syntax_highlighting.0");
7777
let plain_text = || SYNTAX_SET.find_syntax_plain_text();
7878
let syntax = SYNTAX_SET
79-
.find_syntax_for_file(
80-
file_path.to_str().unwrap_or_default(),
81-
)
79+
.find_syntax_for_file(file_path)
8280
.unwrap_or_else(|e| {
8381
log::error!("Could not read the file to detect its syntax: {e}");
8482
Some(plain_text())

0 commit comments

Comments
 (0)