mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-16 04:29:08 +00:00
chore(core/rust): remove useless unsafe block
This commit is contained in:
parent
2b0623121b
commit
f8dc17d028
@ -131,7 +131,7 @@ impl TryFrom<Obj> for Gc<List> {
|
|||||||
type Error = Error;
|
type Error = Error;
|
||||||
|
|
||||||
fn try_from(value: Obj) -> Result<Self, Self::Error> {
|
fn try_from(value: Obj) -> Result<Self, Self::Error> {
|
||||||
if unsafe { ffi::mp_type_list.is_type_of(value) } {
|
if ffi::mp_type_list.is_type_of(value) {
|
||||||
// SAFETY: We assume that if `value` is an object pointer with the correct type,
|
// SAFETY: We assume that if `value` is an object pointer with the correct type,
|
||||||
// it is managed by MicroPython GC (see `Gc::from_raw` for details).
|
// it is managed by MicroPython GC (see `Gc::from_raw` for details).
|
||||||
let this = unsafe { Gc::from_raw(value.as_ptr().cast()) };
|
let this = unsafe { Gc::from_raw(value.as_ptr().cast()) };
|
||||||
|
Loading…
Reference in New Issue
Block a user