diff --git a/src/util.rs b/src/util.rs index 3c94ac7..1c52fa4 100644 --- a/src/util.rs +++ b/src/util.rs @@ -18,7 +18,7 @@ pub fn query_attributes(file: &gio::File, attributes: Vec<&str>) -> anyhow::Resu let mut attributes = attributes; let mut attr_str = String::from(attributes.remove(0)); for attr in attributes { - write!(attr_str, ",{}", attr)?; + write!(attr_str, ",{attr}")?; } file.query_info( @@ -36,7 +36,7 @@ pub async fn query_attributes_future( let mut attr_str = String::from(*attributes.first().context("No attributes")?); for attr in &attributes[1..] { - write!(attr_str, ",{}", attr)?; + write!(attr_str, ",{attr}")?; } file.query_info_future( diff --git a/src/widgets/image_view.rs b/src/widgets/image_view.rs index 9ce9dfb..b82fb9d 100644 --- a/src/widgets/image_view.rs +++ b/src/widgets/image_view.rs @@ -412,10 +412,8 @@ impl LpImageView { } if let Some(current_path) = self.current_path() { - if self.model().contains(¤t_path) { - if !self.imp().preserve_content.get() { - self.update_sliding_view(¤t_path); - } + if self.model().contains(¤t_path) && !self.imp().preserve_content.get() { + self.update_sliding_view(¤t_path); } } }