aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2021-03-08 01:10:11 +0400
committerMarc-André Lureau <marcandre.lureau@redhat.com>2021-03-08 01:10:33 +0400
commit320f92c36a80bfafc5d57834592a7be5fd79f104 (patch)
tree8ec159ed36aa9f91aa91e215e2497a041ec3b99b /tests
parente62d42f0fd76f7bb8bf78385a83c060e66ff52b0 (diff)
downloadkeycodemapdb-320f92c36a80bfafc5d57834592a7be5fd79f104.zip
keycodemapdb-320f92c36a80bfafc5d57834592a7be5fd79f104.tar.gz
keycodemapdb-320f92c36a80bfafc5d57834592a7be5fd79f104.tar.bz2
rust: fix cargo clippy
Fix clippy error about missing main(). Fix various clippy warnings "help: consider removing `'static`: `&str`" Run clippy with the rust test. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Diffstat (limited to 'tests')
-rwxr-xr-xtests/rust1
-rw-r--r--tests/rust-test/src/main.rs7
2 files changed, 7 insertions, 1 deletions
diff --git a/tests/rust b/tests/rust
index 33bd5fa..0e133b1 100755
--- a/tests/rust
+++ b/tests/rust
@@ -2,3 +2,4 @@
cd rust-test
cargo test
+cargo clippy
diff --git a/tests/rust-test/src/main.rs b/tests/rust-test/src/main.rs
index 019c3d4..ba165d0 100644
--- a/tests/rust-test/src/main.rs
+++ b/tests/rust-test/src/main.rs
@@ -7,7 +7,6 @@ include!("../../osx2xkb.rs");
include!("../../osx_name.rs");
include!("../../osx.rs");
-#[test]
fn main() {
assert_eq!(CODE_MAP_OSX_TO_WIN32[0x1d], 0x30);
assert_eq!(NAME_MAP_OSX_TO_WIN32[0x1d], "VK_0");
@@ -21,3 +20,9 @@ fn main() {
assert_eq!(CODE_TABLE_OSX[0x1d], 0x3b);
assert_eq!(NAME_TABLE_OSX[0x1d], "Control");
}
+
+
+#[test]
+fn test() {
+ main()
+}