Should use DirEntry::file_name instead.
DirEntry::file_name returns an OsString.
DirEntry::path returns a PathBuf (a larger allocation) and Path::file_name returns an Option<&OsStr> (a more complicated type).
As mentioned in #920, clippy_utils has expr_or_init, which can help with lightweight dataflow problems like this.