From f8dc17d028209c1c6cc6e1b072eb22c782c29fb8 Mon Sep 17 00:00:00 2001 From: matejcik Date: Mon, 15 Jan 2024 11:00:28 +0100 Subject: [PATCH] chore(core/rust): remove useless unsafe block --- core/embed/rust/src/micropython/list.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/embed/rust/src/micropython/list.rs b/core/embed/rust/src/micropython/list.rs index 42da26313..4ef7bc889 100644 --- a/core/embed/rust/src/micropython/list.rs +++ b/core/embed/rust/src/micropython/list.rs @@ -131,7 +131,7 @@ impl TryFrom for Gc { type Error = Error; fn try_from(value: Obj) -> Result { - 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, // it is managed by MicroPython GC (see `Gc::from_raw` for details). let this = unsafe { Gc::from_raw(value.as_ptr().cast()) };