diff --git a/src/i18n.rs b/src/i18n.rs index 4c1ce44..0c138ba 100644 --- a/src/i18n.rs +++ b/src/i18n.rs @@ -31,7 +31,7 @@ fn freplace(input: String, args: &[&str]) -> String { let mut parts = input.split("{}"); let mut output = parts.next().unwrap_or_default().to_string(); for (p, a) in parts.zip(args.iter()) { - output += &(a.to_string() + &p.to_string()); + output += &(a.to_string() + p); } output } diff --git a/src/util.rs b/src/util.rs index df6451b..b627e0d 100644 --- a/src/util.rs +++ b/src/util.rs @@ -41,7 +41,7 @@ pub async fn query_attributes_future( file: &gio::File, attributes: Vec<&str>, ) -> anyhow::Result { - let mut attr_str = String::from(*attributes.get(0).context("No attributes")?); + let mut attr_str = String::from(*attributes.first().context("No attributes")?); for attr in &attributes[1..] { write!(attr_str, ",{}", attr)?;