From 2de590760b99ef031a79018720a931d3da14e77c Mon Sep 17 00:00:00 2001 From: Liwen Date: Wed, 27 Nov 2024 21:55:39 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=B8=A4=E5=A4=84test?= =?UTF-8?q?=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main/src/commander/keyboard/keys.rs | 8 ++++---- utils/src/ibmeci.rs | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/main/src/commander/keyboard/keys.rs b/main/src/commander/keyboard/keys.rs index 3f72cdf..85d7e3e 100644 --- a/main/src/commander/keyboard/keys.rs +++ b/main/src/commander/keyboard/keys.rs @@ -1048,8 +1048,8 @@ impl Default for Keys { } } +#[cfg(test)] mod tests { - #[allow(unused_imports)] use super::*; #[test] @@ -1060,13 +1060,13 @@ mod tests { #[test] fn test_vk_from_str() { - let key: Keys = "A".into(); + let key: Keys = String::from("A").into(); assert_eq!(key, Keys::VkA); } #[test] fn test_vk_to_str() { - let key_str: &str = Keys::VkA.into(); - assert_eq!(key_str, "A"); + let key_str: String = Keys::VkA.into(); + assert_eq!(key_str, String::from("A")); } } diff --git a/utils/src/ibmeci.rs b/utils/src/ibmeci.rs index d65c711..e695d6f 100644 --- a/utils/src/ibmeci.rs +++ b/utils/src/ibmeci.rs @@ -397,7 +397,7 @@ unsafe impl Send for Ibmeci {} #[cfg(all(test, target_arch = "x86"))] mod test_eci { use super::Ibmeci; - use rigela_utils::logger::init_logger; + use super::super::logger::init_logger; #[tokio::test] async fn main() {