From 901251200325ad4471c64e59941b7fc7f451e7b3 Mon Sep 17 00:00:00 2001 From: zilcH40 Date: Thu, 12 Sep 2024 16:52:32 +0800 Subject: [PATCH] refactor: forget some APIs --- src/rime.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/rime.rs b/src/rime.rs index 2c207ff..30f6229 100644 --- a/src/rime.rs +++ b/src/rime.rs @@ -140,10 +140,9 @@ impl Rime { pub fn destroy(&self) { if RIME.get().is_some() { - unsafe { - librime::RimeCleanupAllSessions(); - librime::RimeFinalize(); - } + let api = Self::get_api(); + rime_call!(api->cleanup_all_sessions); + rime_call!(api->finalize); } }