Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(java): simpilfy fragment #3307

Merged
merged 18 commits into from
Jan 9, 2025
Prev Previous commit
Next Next commit
format
chenkovsky committed Dec 27, 2024
commit dd61ae338776861ddd09c6bd57549d3aec4038c4
12 changes: 0 additions & 12 deletions java/core/lance-jni/src/traits.rs
Original file line number Diff line number Diff line change
@@ -129,18 +129,6 @@ impl JMapExt for JMap<'_, '_, '_> {
}
}

// pub fn export_vec<'a, T>(env: &mut JNIEnv<'a>, vec: &'a [T], class: JClass) -> Result<JObject<'a>>
// where
// &'a T: IntoJava,
// {
// let arr = env.new_object_array(vec.len() as i32, class, JObject::null())?;
// for (idx, e) in vec.iter().enumerate() {
// let obj = e.into_java(env)?;
// env.set_object_array_element(&arr, idx as i32, obj);
// }
// Ok(arr.into())
// }

pub fn export_vec<'a, 'b, T>(env: &mut JNIEnv<'a>, vec: &'b [T]) -> Result<JObject<'a>>
where
&'b T: IntoJava,