diff options
Diffstat (limited to 'src/wrapper/descriptors')
-rw-r--r-- | src/wrapper/descriptors/exception_desc.rs | 2 | ||||
-rw-r--r-- | src/wrapper/descriptors/field_desc.rs | 8 | ||||
-rw-r--r-- | src/wrapper/descriptors/method_desc.rs | 12 |
3 files changed, 11 insertions, 11 deletions
diff --git a/src/wrapper/descriptors/exception_desc.rs b/src/wrapper/descriptors/exception_desc.rs index 71ccf68..4911650 100644 --- a/src/wrapper/descriptors/exception_desc.rs +++ b/src/wrapper/descriptors/exception_desc.rs @@ -40,7 +40,7 @@ impl<'a> Desc<'a, JThrowable<'a>> for String { } } -impl<'a, 'b> Desc<'a, JThrowable<'a>> for JNIString { +impl<'a> Desc<'a, JThrowable<'a>> for JNIString { fn lookup(self, env: &JNIEnv<'a>) -> Result<JThrowable<'a>> { (DEFAULT_EXCEPTION_CLASS, self).lookup(env) } diff --git a/src/wrapper/descriptors/field_desc.rs b/src/wrapper/descriptors/field_desc.rs index cdaf908..405c03b 100644 --- a/src/wrapper/descriptors/field_desc.rs +++ b/src/wrapper/descriptors/field_desc.rs @@ -6,24 +6,24 @@ use crate::{ JNIEnv, }; -impl<'a, 'c, T, U, V> Desc<'a, JFieldID<'a>> for (T, U, V) +impl<'a, 'c, T, U, V> Desc<'a, JFieldID> for (T, U, V) where T: Desc<'a, JClass<'c>>, U: Into<JNIString>, V: Into<JNIString>, { - fn lookup(self, env: &JNIEnv<'a>) -> Result<JFieldID<'a>> { + fn lookup(self, env: &JNIEnv<'a>) -> Result<JFieldID> { env.get_field_id(self.0, self.1, self.2) } } -impl<'a, 'c, T, U, V> Desc<'a, JStaticFieldID<'a>> for (T, U, V) +impl<'a, 'c, T, U, V> Desc<'a, JStaticFieldID> for (T, U, V) where T: Desc<'a, JClass<'c>>, U: Into<JNIString>, V: Into<JNIString>, { - fn lookup(self, env: &JNIEnv<'a>) -> Result<JStaticFieldID<'a>> { + fn lookup(self, env: &JNIEnv<'a>) -> Result<JStaticFieldID> { env.get_static_field_id(self.0, self.1, self.2) } } diff --git a/src/wrapper/descriptors/method_desc.rs b/src/wrapper/descriptors/method_desc.rs index bbd2651..1b94e04 100644 --- a/src/wrapper/descriptors/method_desc.rs +++ b/src/wrapper/descriptors/method_desc.rs @@ -6,34 +6,34 @@ use crate::{ JNIEnv, }; -impl<'a, 'c, T, U, V> Desc<'a, JMethodID<'a>> for (T, U, V) +impl<'a, 'c, T, U, V> Desc<'a, JMethodID> for (T, U, V) where T: Desc<'a, JClass<'c>>, U: Into<JNIString>, V: Into<JNIString>, { - fn lookup(self, env: &JNIEnv<'a>) -> Result<JMethodID<'a>> { + fn lookup(self, env: &JNIEnv<'a>) -> Result<JMethodID> { env.get_method_id(self.0, self.1, self.2) } } -impl<'a, 'c, T, Signature> Desc<'a, JMethodID<'a>> for (T, Signature) +impl<'a, 'c, T, Signature> Desc<'a, JMethodID> for (T, Signature) where T: Desc<'a, JClass<'c>>, Signature: Into<JNIString>, { - fn lookup(self, env: &JNIEnv<'a>) -> Result<JMethodID<'a>> { + fn lookup(self, env: &JNIEnv<'a>) -> Result<JMethodID> { (self.0, "<init>", self.1).lookup(env) } } -impl<'a, 'c, T, U, V> Desc<'a, JStaticMethodID<'a>> for (T, U, V) +impl<'a, 'c, T, U, V> Desc<'a, JStaticMethodID> for (T, U, V) where T: Desc<'a, JClass<'c>>, U: Into<JNIString>, V: Into<JNIString>, { - fn lookup(self, env: &JNIEnv<'a>) -> Result<JStaticMethodID<'a>> { + fn lookup(self, env: &JNIEnv<'a>) -> Result<JStaticMethodID> { env.get_static_method_id(self.0, self.1, self.2) } } |