Remove naked unwrap

This commit is contained in:
bootandy
2018-05-02 00:17:40 +01:00
parent 2556885622
commit 25d1ee7b43
+2 -2
View File
@@ -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
} }