From 23944f114663bf1a84f8b718dfd45e329c94c312 Mon Sep 17 00:00:00 2001
From: Junji Hashimoto <junji.hashimoto@gree.net>
Date: Sun, 21 Apr 2024 14:19:19 +0900
Subject: [PATCH] Allow invalid_reference_casting

---
 tokenizers/src/models/bpe/trainer.rs | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tokenizers/src/models/bpe/trainer.rs b/tokenizers/src/models/bpe/trainer.rs
index 0c411f59c..153c2e921 100644
--- a/tokenizers/src/models/bpe/trainer.rs
+++ b/tokenizers/src/models/bpe/trainer.rs
@@ -414,6 +414,7 @@ impl BpeTrainer {
         word_counts: &HashMap<String, u32>,
         model: &mut BPE,
     ) -> Result<Vec<AddedToken>> {
+	#![allow(invalid_reference_casting)]
         let mut word_to_id: HashMap<String, u32> = HashMap::with_capacity(self.vocab_size);
         let mut id_to_word: Vec<String> = Vec::with_capacity(self.vocab_size);