refactor: Use is_some_and

This commit is contained in:
FineFindus 2023-06-26 11:59:17 +00:00 • committed by Sophie Herold
parent 1a39751402
commit bc9aff5068
5 changed files with 33 additions and 33 deletions

View file

@ -345,10 +345,11 @@ impl LpImageView {
fn navigate_to_file(&self, new_file: &gio::File) {
let sliding_view = self.sliding_view();
if let Some(current_file) = self.current_file() {
if new_file.equal(&current_file) {
return;
}
if self
.current_file()
.is_some_and(|current_file| current_file.equal(new_file))
{
return;
}
let Some(new_index) = self.model().index_of(new_file) else {