From d218325b12180a3acef0c74e4604b3bc2c3080d6 Mon Sep 17 00:00:00 2001 From: sapir Date: Sun, 12 Apr 2020 22:27:05 +0300 Subject: [PATCH] Fix some warnings Former-commit-id: e60d535f0c9b73209109b1040f6780b10c6b1174 --- bindings/rustboyadvance-jni/src/lib.rs | 8 ++++---- bindings/rustboyadvance-jni/src/rom_helper.rs | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/bindings/rustboyadvance-jni/src/lib.rs b/bindings/rustboyadvance-jni/src/lib.rs index 5e45ad0..5363f9c 100644 --- a/bindings/rustboyadvance-jni/src/lib.rs +++ b/bindings/rustboyadvance-jni/src/lib.rs @@ -61,8 +61,8 @@ impl VideoInterface for Hardware { } impl AudioInterface for Hardware { fn push_sample(&mut self, sample: StereoSample) { - self.audio_buffer.prod.push(sample.0); - self.audio_buffer.prod.push(sample.1); + self.audio_buffer.prod.push(sample.0).unwrap(); + self.audio_buffer.prod.push(sample.1).unwrap(); } } impl InputInterface for Hardware { @@ -281,7 +281,7 @@ pub mod bindings { _obj: JClass, ctx: jlong, ) -> jshortArray { - let mut ctx = lock_ctx(ctx); + let ctx = lock_ctx(ctx); let mut hw = ctx.hwif.borrow_mut(); @@ -292,7 +292,7 @@ pub mod bindings { } let arr = env.new_short_array(samples.len() as jsize).unwrap(); - env.set_short_array_region(arr, 0, &samples); + env.set_short_array_region(arr, 0, &samples).unwrap(); return arr; } diff --git a/bindings/rustboyadvance-jni/src/rom_helper.rs b/bindings/rustboyadvance-jni/src/rom_helper.rs index bc966a4..f3ba62a 100644 --- a/bindings/rustboyadvance-jni/src/rom_helper.rs +++ b/bindings/rustboyadvance-jni/src/rom_helper.rs @@ -1,6 +1,6 @@ use jni::objects::*; use jni::sys::*; -use jni::{JNIEnv, JavaVM}; +use jni::JNIEnv; use rustboyadvance_core::core::cartridge;