diff --git a/tokenizers/src/models/bpe/serialization.rs b/tokenizers/src/models/bpe/serialization.rs index 24525a551..bbf37b6b5 100644 --- a/tokenizers/src/models/bpe/serialization.rs +++ b/tokenizers/src/models/bpe/serialization.rs @@ -179,7 +179,7 @@ mod test { .unwrap(); let legacy = r#"{"type":"BPE","dropout":null,"unk_token":"","continuing_subword_prefix":null,"end_of_word_suffix":null,"fuse_unk":false,"byte_fallback":false,"ignore_merges":true,"vocab":{"":0,"a":1,"b":2,"ab":3},"merges":["a b"]}"#; - let legacy = serde_json::from_str(&legacy).unwrap(); + let legacy = serde_json::from_str(legacy).unwrap(); assert_eq!(bpe, legacy); let data = serde_json::to_string(&bpe).unwrap(); diff --git a/tokenizers/src/models/mod.rs b/tokenizers/src/models/mod.rs index 59e981fac..cdfb731a8 100644 --- a/tokenizers/src/models/mod.rs +++ b/tokenizers/src/models/mod.rs @@ -313,7 +313,7 @@ mod tests { let model = ModelWrapper::BPE(bpe); let legacy = r#"{"type":"BPE","dropout":null,"unk_token":"","continuing_subword_prefix":null,"end_of_word_suffix":null,"fuse_unk":false,"byte_fallback":false,"ignore_merges":true,"vocab":{"":0,"a":1,"b":2,"ab":3},"merges":["a b"]}"#; - let legacy = serde_json::from_str(&legacy).unwrap(); + let legacy = serde_json::from_str(legacy).unwrap(); assert_eq!(model, legacy); let data = serde_json::to_string(&model).unwrap();