From b1a5ab1941ed8192cc9249c39421e92d77b96aec Mon Sep 17 00:00:00 2001 From: Christian Egli Date: Thu, 23 May 2024 13:39:40 +0200 Subject: [PATCH] Format the source code --- src/translator.rs | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/translator.rs b/src/translator.rs index 2152500..bb947e8 100644 --- a/src/translator.rs +++ b/src/translator.rs @@ -14,7 +14,11 @@ pub enum TranslationError { #[error("Implicit character {0:?} not defined")] ImplicitCharacterNotDefined(char), #[error("Character in base rule not defined: derived: {derived:?}, base: {base:?}, direction: {direction:?}")] - BaseCharacterNotDefined{base: char, derived: char, direction: Direction}, + BaseCharacterNotDefined { + base: char, + derived: char, + direction: Direction, + }, } #[derive(Debug, PartialEq, Clone)] @@ -242,7 +246,13 @@ impl TranslationTable { for rule in rules { match rule.rule { Rule::Base { derived, base, .. } => { - let translation = character_definitions.get(&base).ok_or(TranslationError::BaseCharacterNotDefined{base, derived, direction})?; + let translation = character_definitions.get(&base).ok_or( + TranslationError::BaseCharacterNotDefined { + base, + derived, + direction, + }, + )?; character_definitions.insert( derived, Translation {