From 1b92d0052e1c0aa191f34e119558c875aaaad5a5 Mon Sep 17 00:00:00 2001 From: zaaarf Date: Wed, 6 Sep 2023 23:19:41 +0200 Subject: [PATCH] chore: panic on fake constructor called --- Cargo.toml | 10 +++------- src/main/rust/lib.rs | 6 +++--- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index fb0ec71..2015082 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,17 +4,13 @@ version = "0.1.0" edition = "2021" [dependencies] -codemp = { git = "ssh://git@github.com-irl/codewithotherpeopleandchangenamelater/codemp.git", tag = "v0.4.4", features = ["global"] } +codemp = { git = "ssh://git@github.com/codewithotherpeopleandchangenamelater/codemp.git", tag = "v0.4.5", features = ["global"] } jni = { version = "0.21.1", features = ["invocation"] } -rifgen = { path = "/home/zaaarf/dev/irl/rust/jni/rifgen" } -#rifgen = { git = "https://github.com/Kofituo/rifgen.git", rev = "d27d9785b2febcf5527f1deb6a846be5d583f7d7"} -#rifgen = "0.1.7" +rifgen = { git = "https://github.com/Kofituo/rifgen.git", rev = "d27d9785b2febcf5527f1deb6a846be5d583f7d7"} [build-dependencies] flapigen = "0.6.0" -rifgen = { path = "/home/zaaarf/dev/irl/rust/jni/rifgen" } -#rifgen = "0.1.7" -#rifgen = { git = "https://github.com/Kofituo/rifgen.git", rev = "d27d9785b2febcf5527f1deb6a846be5d583f7d7"} +rifgen = { git = "https://github.com/Kofituo/rifgen.git", rev = "d27d9785b2febcf5527f1deb6a846be5d583f7d7"} [lib] diff --git a/src/main/rust/lib.rs b/src/main/rust/lib.rs index 29b76d7..71cd59e 100644 --- a/src/main/rust/lib.rs +++ b/src/main/rust/lib.rs @@ -79,7 +79,7 @@ struct CursorHandler { impl CursorHandler { #[generate_interface(constructor)] async fn new() -> CursorHandler { //TODO: this sucks but whatever - CursorHandler { cursor: None } + panic!("Default constructor for CursrorHandler should never be called!") } } @@ -91,6 +91,6 @@ struct BufferHandler { impl BufferHandler { #[generate_interface(constructor)] async fn new() -> BufferHandler { //TODO: this sucks but whatever - BufferHandler { buffer: None } + panic!("Default constructor for BufferHandler should never be called!") } -} \ No newline at end of file +}