mirror of
https://github.com/hexedtech/codemp.git
synced 2024-11-25 00:24:48 +01:00
Merge branch 'dev' into feat/small-binaries
This commit is contained in:
commit
f15fec6272
6 changed files with 7 additions and 7 deletions
|
@ -4,7 +4,7 @@ use jni_toolbox::jni;
|
||||||
#[allow(non_snake_case)]
|
#[allow(non_snake_case)]
|
||||||
#[jni(package = "mp.code", class = "Extensions")]
|
#[jni(package = "mp.code", class = "Extensions")]
|
||||||
fn version() -> String {
|
fn version() -> String {
|
||||||
crate::version()
|
crate::version().to_string()
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Calculate the XXH3 hash for a given String.
|
/// Calculate the XXH3 hash for a given String.
|
||||||
|
|
|
@ -52,6 +52,6 @@ impl CursorController {
|
||||||
/// Block until next
|
/// Block until next
|
||||||
#[napi(js_name = "recv")]
|
#[napi(js_name = "recv")]
|
||||||
pub async fn js_recv(&self) -> napi::Result<crate::api::Cursor> {
|
pub async fn js_recv(&self) -> napi::Result<crate::api::Cursor> {
|
||||||
Ok(self.recv().await?.into())
|
Ok(self.recv().await?)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,5 +9,5 @@ pub fn js_hash(data: String) -> i64 {
|
||||||
/// Get the current version of the client
|
/// Get the current version of the client
|
||||||
#[napi(js_name = "version")]
|
#[napi(js_name = "version")]
|
||||||
pub fn js_version() -> String {
|
pub fn js_version() -> String {
|
||||||
crate::version()
|
crate::version().to_string()
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,7 +45,7 @@ fn entrypoint(lua: &Lua) -> LuaResult<LuaTable> {
|
||||||
|
|
||||||
exports.set(
|
exports.set(
|
||||||
"version",
|
"version",
|
||||||
lua.create_function(|_, ()| Ok(crate::version()))?,
|
lua.create_function(|_, ()| Ok(crate::version().to_string()))?,
|
||||||
)?;
|
)?;
|
||||||
|
|
||||||
// runtime
|
// runtime
|
||||||
|
|
|
@ -134,7 +134,7 @@ impl Driver {
|
||||||
|
|
||||||
#[pyfunction]
|
#[pyfunction]
|
||||||
fn version() -> String {
|
fn version() -> String {
|
||||||
crate::version()
|
crate::version().to_string()
|
||||||
}
|
}
|
||||||
|
|
||||||
#[pyfunction]
|
#[pyfunction]
|
||||||
|
|
|
@ -127,6 +127,6 @@ pub mod ffi;
|
||||||
pub(crate) mod network;
|
pub(crate) mod network;
|
||||||
|
|
||||||
/// Get the current version of the client
|
/// Get the current version of the client
|
||||||
pub fn version() -> String {
|
pub fn version() -> &'static str {
|
||||||
env!("CARGO_PKG_VERSION").to_owned()
|
env!("CARGO_PKG_VERSION")
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue