forked from BigfootDev/flatbuffers
Mark endian_scalar as unsafe. (#6588)
* Mark endian_scalar as unsafe. Also - removed the deprecated flexbuffer slice from example - fixed some cargo warnings * Assertions and read_scalar made unsafe * Clippy lints * Add to Safety Co-authored-by: Casper Neo <cneo@google.com>
This commit is contained in:
@@ -61,7 +61,9 @@ macro_rules! impl_push_for_endian_scalar {
|
||||
|
||||
#[inline]
|
||||
fn push(&self, dst: &mut [u8], _rest: &[u8]) {
|
||||
emplace_scalar::<$ty>(dst, *self);
|
||||
unsafe {
|
||||
emplace_scalar::<$ty>(dst, *self);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user