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,
) -> String {
let printable_name = {
if short_paths && dir_name.contains('/') {
dir_name.split('/').last().unwrap()
if short_paths {
dir_name.split('/').last().unwrap_or(dir_name)
} else {
dir_name
}