From 6977b6ab6f2b059e2ee56d287f7daced7e8c4589 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Fri, 20 Aug 2021 16:26:30 +1000 Subject: [PATCH] fix new clippy warning --- rslib/i18n/build/extract.rs | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/rslib/i18n/build/extract.rs b/rslib/i18n/build/extract.rs index dc09ed095..bd0bb01e0 100644 --- a/rslib/i18n/build/extract.rs +++ b/rslib/i18n/build/extract.rs @@ -1,11 +1,15 @@ // Copyright: Ankitects Pty Ltd and contributors // License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html -use crate::gather::TranslationsByLang; -use fluent_syntax::ast::{Entry, Expression, InlineExpression, Pattern, PatternElement}; -use fluent_syntax::parser::parse; -use serde::Serialize; use std::{collections::HashSet, fmt::Write}; + +use fluent_syntax::{ + ast::{Entry, Expression, InlineExpression, Pattern, PatternElement}, + parser::parse, +}; +use serde::Serialize; + +use crate::gather::TranslationsByLang; #[derive(Debug, PartialOrd, Ord, PartialEq, Eq, Serialize)] pub struct Module { pub name: String, @@ -148,7 +152,7 @@ impl Visitor { fn visit_expression(&mut self, expression: &Expression<&str>) { match expression { Expression::Select { selector, variants } => { - self.visit_inline_expression(&selector, true); + self.visit_inline_expression(selector, true); self.visit_pattern(&variants.last().unwrap().value) } Expression::Inline(expr) => self.visit_inline_expression(expr, false),