mirror of
https://github.com/Llewellynvdm/exa.git
synced 2024-11-22 03:55:11 +00:00
Replace strip_prefix with replace
This commit is contained in:
parent
57cf0f1b23
commit
5743e6d8e3
@ -298,10 +298,9 @@ fn determine_time_zone() -> TZResult<TimeZone> {
|
||||
} else {
|
||||
format!("/usr/share/zoneinfo/{}", {
|
||||
if file.starts_with(":") {
|
||||
// Unwrap is panic-free here because we've checked if file starts with colon
|
||||
file.strip_prefix(":").unwrap()
|
||||
file.replace(":", "")
|
||||
} else {
|
||||
file.as_str()
|
||||
file
|
||||
}
|
||||
})
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user