From 358586c51369f82bbf450fd37bb30e3ad3d5226e Mon Sep 17 00:00:00 2001 From: alemi Date: Tue, 24 Sep 2024 04:46:02 +0200 Subject: [PATCH] fix: inline more --- src/into_java.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/into_java.rs b/src/into_java.rs index 9b7c42a..bff8909 100644 --- a/src/into_java.rs +++ b/src/into_java.rs @@ -14,6 +14,7 @@ macro_rules! auto_into_java { impl<'j> IntoJava<'j> for $t { type Ret = $j; + #[inline] fn into_java(self, _: &mut jni::JNIEnv<'j>) -> Result { Ok(self) } @@ -43,6 +44,7 @@ impl<'j> IntoJava<'j> for bool { impl<'j, X: IntoJavaObject<'j>> IntoJava<'j> for X { type Ret = jni::sys::jobject; + #[inline] fn into_java(self, env: &mut jni::JNIEnv<'j>) -> Result { Ok(self.into_java_object(env)?.as_raw()) } @@ -58,6 +60,7 @@ pub trait IntoJavaObject<'j> { impl<'j> IntoJavaObject<'j> for JObject<'j> { const CLASS: &'static str = "java/lang/Object"; + #[inline] fn into_java_object(self, _: &mut jni::JNIEnv<'j>) -> Result, jni::errors::Error> { Ok(self) } @@ -67,6 +70,7 @@ macro_rules! auto_into_java_object { ($t:ty, $cls:literal) => { impl<'j> IntoJavaObject<'j> for $t { const CLASS: &'static str = $cls; + #[inline] fn into_java_object(self, _: &mut jni::JNIEnv<'j>) -> Result, jni::errors::Error> { Ok(self.into()) }