From d1eff9e052e43cf0866283bd9ff85dfae05ad816 Mon Sep 17 00:00:00 2001 From: bunnie Date: Sat, 15 Jan 2022 17:04:40 +0800 Subject: [PATCH] ah, that's how you init an Option array... --- services/ime-frontend/src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/ime-frontend/src/main.rs b/services/ime-frontend/src/main.rs index aac9ebcd6..a51e8a1f6 100644 --- a/services/ime-frontend/src/main.rs +++ b/services/ime-frontend/src/main.rs @@ -84,7 +84,7 @@ impl InputTracker { insertion: 0, last_height: 0, was_grown: false, - pred_options: [None, None, None, None], // this has to be manually inferred because String doesn't implement "copy" and can't be None-init automatically + pred_options: Default::default(), } } pub fn set_gam_token(&mut self, token: [u32; 4]) {