mirror of
https://github.com/chatmail/core.git
synced 2026-05-05 06:16:30 +03:00
Reduce unwrap and expect usage
This commit is contained in:
@@ -289,7 +289,7 @@ impl<'a> BlobObject<'a> {
|
||||
|
||||
/// Returns the filename of the blob.
|
||||
pub fn as_file_name(&self) -> &str {
|
||||
self.name.rsplit('/').next().unwrap()
|
||||
self.name.rsplit('/').next().unwrap_or_default()
|
||||
}
|
||||
|
||||
/// The path relative in the blob directory.
|
||||
|
||||
Reference in New Issue
Block a user