mirror of
https://github.com/Llewellynvdm/exa.git
synced 2024-11-22 20:15: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 {
|
} else {
|
||||||
format!("/usr/share/zoneinfo/{}", {
|
format!("/usr/share/zoneinfo/{}", {
|
||||||
if file.starts_with(":") {
|
if file.starts_with(":") {
|
||||||
// Unwrap is panic-free here because we've checked if file starts with colon
|
file.replace(":", "")
|
||||||
file.strip_prefix(":").unwrap()
|
|
||||||
} else {
|
} else {
|
||||||
file.as_str()
|
file
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user