Use single char pattern for better performance

This commit is contained in:
Victor Song 2022-09-30 23:31:47 -04:00
parent 433a9a52d3
commit d24ca084a3
1 changed files with 1 additions and 1 deletions

View File

@ -347,7 +347,7 @@ fn determine_time_zone() -> TZResult<TimeZone> {
} else { } else {
format!("/usr/share/zoneinfo/{}", { format!("/usr/share/zoneinfo/{}", {
if file.starts_with(':') { if file.starts_with(':') {
file.replacen(":", "", 1) file.replacen(':', "", 1)
} else { } else {
file file
} }