diff --git a/core/embed/extmod/trezorobj.c b/core/embed/extmod/trezorobj.c index 153930d01..13d153ff5 100644 --- a/core/embed/extmod/trezorobj.c +++ b/core/embed/extmod/trezorobj.c @@ -71,7 +71,7 @@ mp_obj_t trezor_obj_call_protected(void (*func)(void *), void *arg) { if (nlr_push(&nlr) == 0) { (*func)(arg); nlr_pop(); - return mp_const_none; + return NULL; } else { return MP_OBJ_FROM_PTR(nlr.ret_val); } diff --git a/core/embed/rust/src/micropython/runtime.rs b/core/embed/rust/src/micropython/runtime.rs index fb4eccc7f..f71e17635 100644 --- a/core/embed/rust/src/micropython/runtime.rs +++ b/core/embed/rust/src/micropython/runtime.rs @@ -2,7 +2,7 @@ use core::mem::MaybeUninit; use crate::error::Error; -use super::{ffi, obj::Obj}; +use super::ffi; /// Raise a micropython exception via NLR jump. /// Jumps directly out of the context without running any destructors, @@ -34,7 +34,7 @@ where // boundary, so we assign it explicitly in `wrapper`. let mut result = MaybeUninit::zeroed(); let mut wrapper = || { - result = MaybeUninit::new(func()); + result.write(func()); }; // `wrapper` is a closure, and to pass it over the FFI, we split it into a // function pointer, and a user-data pointer. @@ -42,7 +42,7 @@ where // `argument`. let (callback, argument) = split_func_into_callback_and_argument(&mut wrapper); let exception = ffi::trezor_obj_call_protected(Some(callback), argument); - if exception == Obj::const_none() { + if exception.is_null() { Ok(result.assume_init()) } else { Err(Error::CaughtException(exception)) diff --git a/docs/core/build/emulator.md b/docs/core/build/emulator.md index 6edc93014..8dee69c68 100644 --- a/docs/core/build/emulator.md +++ b/docs/core/build/emulator.md @@ -54,7 +54,7 @@ brew install scons sdl2 sdl2_image pkg-config llvm ## Rust -You will require Rust and Cargo. The currently supported version is 1.52 stable. +You will require Rust and Cargo. The currently supported version is 1.55 stable. The recommended way to install both is with [`rustup`](https://rustup.rs/). If you are installing `rustup` for the first time, the stable toolchain will be installed for you automatically. Otherwise, make sure you are up to date: