From 7595e985bbcbdbce00ff4cf4f12fee301b812f66 Mon Sep 17 00:00:00 2001 From: Koichi Akabe Date: Thu, 12 Oct 2023 21:46:23 +0900 Subject: [PATCH] Use or_default() --- vaporetto/src/tag_trainer.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vaporetto/src/tag_trainer.rs b/vaporetto/src/tag_trainer.rs index 8e1c69d..54adda4 100644 --- a/vaporetto/src/tag_trainer.rs +++ b/vaporetto/src/tag_trainer.rs @@ -100,7 +100,7 @@ impl<'a> TagTrainer<'a> { } self.examples .entry(token.surface()) - .or_insert_with(Vec::new) + .or_default() .push(TagExample { tags: token.tags(), features,