Skip to content

Commit

Permalink
Remove unneeded cast
Browse files Browse the repository at this point in the history
  • Loading branch information
temeddix committed Jun 8, 2024
1 parent eb86199 commit d82f8ad
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions rust_crate/src/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,10 @@ macro_rules! write_interface {
binary_size: usize,
) {
let _ = std::panic::catch_unwind(|| {
let message_bytes = unsafe {
std::slice::from_raw_parts(message_pointer as *mut u8, message_size).to_vec()
};
let binary = unsafe {
std::slice::from_raw_parts(binary_pointer as *mut u8, binary_size).to_vec()
};
let message_bytes =
unsafe { std::slice::from_raw_parts(message_pointer, message_size).to_vec() };
let binary =
unsafe { std::slice::from_raw_parts(binary_pointer, binary_size).to_vec() };
messages::generated::handle_dart_signal(message_id as i32, message_bytes, binary);
});
}
Expand Down

0 comments on commit d82f8ad

Please sign in to comment.