Skip to content

Commit

Permalink
Update to Rust 1.76.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jim-signal authored Mar 19, 2024
1 parent 64e9f32 commit 5aac3c4
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion rust-toolchain
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.74.1
1.76.0
5 changes: 3 additions & 2 deletions src/rust/src/android/android_platform.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2003,7 +2003,7 @@ impl sfu::Delegate for AndroidPlatform {

// Set a frame capacity of min (5) + objects (5) + elements (N * 1 object per element).
let capacity = (10 + joined_members.len()) as i32;
match env.with_local_frame_returning_local(capacity, |env| -> Result<_> {
let result = env.with_local_frame_returning_local(capacity, |env| -> Result<_> {
let jni_peek_info = match self.make_peek_info_object(
env,
&peek_info,
Expand All @@ -2020,7 +2020,8 @@ impl sfu::Delegate for AndroidPlatform {
jni_peek_info => java.lang.Object,
) -> void);
Ok(env.new_object(http_result_class, args.sig, &args.args)?)
}) {
});
match result {
Ok(v) if !v.is_null() => v,
Ok(_) => {
// Already logged, so just bail out early.
Expand Down
5 changes: 3 additions & 2 deletions src/rust/src/android/jni_util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ pub struct ExceptionCheckingJNIEnv<'a>(JNIEnv<'a>);

impl Drop for ExceptionCheckingJNIEnv<'_> {
fn drop(&mut self) {
match try_scoped(|| {
let result = try_scoped(|| {
let exception = self.exception_occurred()?;
if exception.is_null() {
return Ok(());
Expand All @@ -316,7 +316,8 @@ impl Drop for ExceptionCheckingJNIEnv<'_> {
jni_args!((thread => java.lang.Thread, exception => java.lang.Throwable) -> void),
)?;
Ok(())
}) {
});
match result {
Ok(()) => {}
Err(e) => {
error!("unable to rethrow exception: {e}");
Expand Down
5 changes: 3 additions & 2 deletions src/rust/src/electron.rs
Original file line number Diff line number Diff line change
Expand Up @@ -397,13 +397,14 @@ impl CallEndpoint {
// because otherwise a new event could come in *during* the processing.
event_reported_for_callback.store(false, std::sync::atomic::Ordering::Relaxed);

match cx.try_catch(|cx| {
let result = cx.try_catch(|cx| {
let observer = js_object.as_ref().to_inner(cx);
let method_name = "processEvents";
let method = observer.get::<JsFunction, _, _>(cx, method_name)?;
method.call(cx, observer, [])?;
Ok(())
}) {
});
match result {
Ok(_) => {}
Err(e) => {
error!(
Expand Down

0 comments on commit 5aac3c4

Please sign in to comment.