mirror of
https://github.com/bootandy/dust.git
synced 2026-06-08 11:29:05 +03:00
Remove naked unwrap
This commit is contained in:
+2
-2
@@ -141,8 +141,8 @@ pub fn format_string(
|
|||||||
indentation: &str,
|
indentation: &str,
|
||||||
) -> String {
|
) -> String {
|
||||||
let printable_name = {
|
let printable_name = {
|
||||||
if short_paths && dir_name.contains('/') {
|
if short_paths {
|
||||||
dir_name.split('/').last().unwrap()
|
dir_name.split('/').last().unwrap_or(dir_name)
|
||||||
} else {
|
} else {
|
||||||
dir_name
|
dir_name
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user