mirror of
https://github.com/hexedtech/codemp.git
synced 2024-11-22 23:34:49 +01:00
fix(java): use ext::hash() instead
This commit is contained in:
parent
39f69cc418
commit
a5502d1f1f
1 changed files with 1 additions and 3 deletions
|
@ -1,5 +1,4 @@
|
||||||
use jni::{objects::{JClass, JObject, JString, JValueGen}, sys::{jlong, jobject, jstring}, JNIEnv};
|
use jni::{objects::{JClass, JObject, JString, JValueGen}, sys::{jlong, jobject, jstring}, JNIEnv};
|
||||||
use xxhash_rust::xxh3::xxh3_64;
|
|
||||||
|
|
||||||
use crate::api::Controller;
|
use crate::api::Controller;
|
||||||
|
|
||||||
|
@ -129,7 +128,6 @@ pub extern "system" fn Java_mp_code_data_TextChange_hash<'local>(
|
||||||
let content: String = env.get_string(&content)
|
let content: String = env.get_string(&content)
|
||||||
.map(|s| s.into())
|
.map(|s| s.into())
|
||||||
.jexcept(&mut env);
|
.jexcept(&mut env);
|
||||||
|
let hash = crate::ext::hash(content.as_bytes());
|
||||||
let hash = xxh3_64(content.as_bytes());
|
|
||||||
i64::from_ne_bytes(hash.to_ne_bytes())
|
i64::from_ne_bytes(hash.to_ne_bytes())
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue