From 2327cd1a3a93f6a5fee4302527367852065c1b2b Mon Sep 17 00:00:00 2001 From: Arthur Date: Fri, 10 Nov 2023 15:29:58 +0100 Subject: [PATCH] lint --- tokenizers/src/pre_tokenizers/metaspace.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tokenizers/src/pre_tokenizers/metaspace.rs b/tokenizers/src/pre_tokenizers/metaspace.rs index 8fb84c57e..0b3ba3b8f 100644 --- a/tokenizers/src/pre_tokenizers/metaspace.rs +++ b/tokenizers/src/pre_tokenizers/metaspace.rs @@ -19,7 +19,6 @@ fn skip_legacy_serialization(legacy: &bool) -> bool { *legacy // Skip serialization if legacy is true } - impl<'de> Deserialize<'de> for Metaspace { fn deserialize(deserializer: D) -> std::result::Result where @@ -79,9 +78,10 @@ impl PreTokenizer for Metaspace { pretokenized.split(|_, mut normalized| { normalized.replace(' ', &self.str_rep)?; - if self.add_prefix_space{ - if self.legacy{normalized.prepend(&self.str_rep);} - else if self.add_prefix_space && first_split{ + if self.add_prefix_space { + if self.legacy { + normalized.prepend(&self.str_rep); + } else if self.add_prefix_space && first_split { normalized.prepend(&self.str_rep); first_split = false; // Set the flag to false after the first split }