Skip to content

Commit

Permalink
Update macro to handle unsafe (#2015)
Browse files Browse the repository at this point in the history
  • Loading branch information
pema99 committed Jul 5, 2022
1 parent a851037 commit cddc1f9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/macros.rs
Expand Up @@ -259,7 +259,7 @@ macro_rules! implement_buffer_content {
type Owned = Box<$struct_name<$($gs)*>>;

#[inline]
fn read<F, E>(size: usize, f: F) -> ::std::result::Result<Box<$struct_name<$($gs)*>>, E>
unsafe fn read<F, E>(size: usize, f: F) -> ::std::result::Result<Box<$struct_name<$($gs)*>>, E>
where F: FnOnce(&mut $struct_name<$($gs)*>) -> ::std::result::Result<(), E>
{
use std::mem;
Expand Down

0 comments on commit cddc1f9

Please sign in to comment.