chore: panic on fake constructor called

This commit is contained in:
zaaarf 2023-09-06 23:19:41 +02:00
parent 6c892e7e3a
commit 1b92d0052e
No known key found for this signature in database
GPG key ID: 82240E075E31FA4C
2 changed files with 6 additions and 10 deletions

View file

@ -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]

View file

@ -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!")
}
}