mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 14:32:22 -04:00
fix new clippy warning
This commit is contained in:
parent
ce4dcab9e4
commit
6977b6ab6f
1 changed files with 9 additions and 5 deletions
|
@ -1,11 +1,15 @@
|
||||||
// Copyright: Ankitects Pty Ltd and contributors
|
// Copyright: Ankitects Pty Ltd and contributors
|
||||||
// License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
// 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 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)]
|
#[derive(Debug, PartialOrd, Ord, PartialEq, Eq, Serialize)]
|
||||||
pub struct Module {
|
pub struct Module {
|
||||||
pub name: String,
|
pub name: String,
|
||||||
|
@ -148,7 +152,7 @@ impl Visitor {
|
||||||
fn visit_expression(&mut self, expression: &Expression<&str>) {
|
fn visit_expression(&mut self, expression: &Expression<&str>) {
|
||||||
match expression {
|
match expression {
|
||||||
Expression::Select { selector, variants } => {
|
Expression::Select { selector, variants } => {
|
||||||
self.visit_inline_expression(&selector, true);
|
self.visit_inline_expression(selector, true);
|
||||||
self.visit_pattern(&variants.last().unwrap().value)
|
self.visit_pattern(&variants.last().unwrap().value)
|
||||||
}
|
}
|
||||||
Expression::Inline(expr) => self.visit_inline_expression(expr, false),
|
Expression::Inline(expr) => self.visit_inline_expression(expr, false),
|
||||||
|
|
Loading…
Reference in a new issue