Skip to content

Commit ce731cb

Browse files
committed
These changes were created by running cargo fix --edition
NOTE: I attempted to run flatc to re-generate the flatbuffer generated files but it did not do the updates for 2024 edition. Updated manually for review feedback Signed-off-by: Simon Davies <[email protected]>
1 parent 7cb01b8 commit ce731cb

26 files changed

+133
-68
lines changed

src/hyperlight_common/src/flatbuffers/hyperlight/generated/error_code_generated.rs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,16 +124,20 @@ impl<'a> flatbuffers::Follow<'a> for ErrorCode {
124124
type Inner = Self;
125125
#[inline]
126126
unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
127-
let b = flatbuffers::read_scalar_at::<u64>(buf, loc);
128-
Self(b)
127+
unsafe {
128+
let b = flatbuffers::read_scalar_at::<u64>(buf, loc);
129+
Self(b)
130+
}
129131
}
130132
}
131133

132134
impl flatbuffers::Push for ErrorCode {
133135
type Output = ErrorCode;
134136
#[inline]
135137
unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
136-
flatbuffers::emplace_scalar::<u64>(dst, self.0);
138+
unsafe {
139+
flatbuffers::emplace_scalar::<u64>(dst, self.0);
140+
}
137141
}
138142
}
139143

src/hyperlight_common/src/flatbuffers/hyperlight/generated/function_call_generated.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,10 @@ impl<'a> flatbuffers::Follow<'a> for FunctionCall<'a> {
2121
type Inner = FunctionCall<'a>;
2222
#[inline]
2323
unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
24-
Self {
25-
_tab: flatbuffers::Table::new(buf, loc),
24+
unsafe {
25+
Self {
26+
_tab: flatbuffers::Table::new(buf, loc),
27+
}
2628
}
2729
}
2830
}
@@ -290,14 +292,14 @@ pub fn size_prefixed_root_as_function_call_with_opts<'b, 'o>(
290292
/// # Safety
291293
/// Callers must trust the given bytes do indeed contain a valid `FunctionCall`.
292294
pub unsafe fn root_as_function_call_unchecked(buf: &[u8]) -> FunctionCall {
293-
flatbuffers::root_unchecked::<FunctionCall>(buf)
295+
unsafe { flatbuffers::root_unchecked::<FunctionCall>(buf) }
294296
}
295297
#[inline]
296298
/// Assumes, without verification, that a buffer of bytes contains a size prefixed FunctionCall and returns it.
297299
/// # Safety
298300
/// Callers must trust the given bytes do indeed contain a valid size prefixed `FunctionCall`.
299301
pub unsafe fn size_prefixed_root_as_function_call_unchecked(buf: &[u8]) -> FunctionCall {
300-
flatbuffers::size_prefixed_root_unchecked::<FunctionCall>(buf)
302+
unsafe { flatbuffers::size_prefixed_root_unchecked::<FunctionCall>(buf) }
301303
}
302304
#[inline]
303305
pub fn finish_function_call_buffer<'a, 'b, A: flatbuffers::Allocator + 'a>(

src/hyperlight_common/src/flatbuffers/hyperlight/generated/function_call_result_generated.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,10 @@ impl<'a> flatbuffers::Follow<'a> for FunctionCallResult<'a> {
2121
type Inner = FunctionCallResult<'a>;
2222
#[inline]
2323
unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
24-
Self {
25-
_tab: flatbuffers::Table::new(buf, loc),
24+
unsafe {
25+
Self {
26+
_tab: flatbuffers::Table::new(buf, loc),
27+
}
2628
}
2729
}
2830
}
@@ -513,7 +515,7 @@ pub fn size_prefixed_root_as_function_call_result_with_opts<'b, 'o>(
513515
/// # Safety
514516
/// Callers must trust the given bytes do indeed contain a valid `FunctionCallResult`.
515517
pub unsafe fn root_as_function_call_result_unchecked(buf: &[u8]) -> FunctionCallResult {
516-
flatbuffers::root_unchecked::<FunctionCallResult>(buf)
518+
unsafe { flatbuffers::root_unchecked::<FunctionCallResult>(buf) }
517519
}
518520
#[inline]
519521
/// Assumes, without verification, that a buffer of bytes contains a size prefixed FunctionCallResult and returns it.
@@ -522,7 +524,7 @@ pub unsafe fn root_as_function_call_result_unchecked(buf: &[u8]) -> FunctionCall
522524
pub unsafe fn size_prefixed_root_as_function_call_result_unchecked(
523525
buf: &[u8],
524526
) -> FunctionCallResult {
525-
flatbuffers::size_prefixed_root_unchecked::<FunctionCallResult>(buf)
527+
unsafe { flatbuffers::size_prefixed_root_unchecked::<FunctionCallResult>(buf) }
526528
}
527529
#[inline]
528530
pub fn finish_function_call_result_buffer<'a, 'b, A: flatbuffers::Allocator + 'a>(

src/hyperlight_common/src/flatbuffers/hyperlight/generated/function_call_type_generated.rs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,16 +66,20 @@ impl<'a> flatbuffers::Follow<'a> for FunctionCallType {
6666
type Inner = Self;
6767
#[inline]
6868
unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
69-
let b = flatbuffers::read_scalar_at::<u8>(buf, loc);
70-
Self(b)
69+
unsafe {
70+
let b = flatbuffers::read_scalar_at::<u8>(buf, loc);
71+
Self(b)
72+
}
7173
}
7274
}
7375

7476
impl flatbuffers::Push for FunctionCallType {
7577
type Output = FunctionCallType;
7678
#[inline]
7779
unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
78-
flatbuffers::emplace_scalar::<u8>(dst, self.0);
80+
unsafe {
81+
flatbuffers::emplace_scalar::<u8>(dst, self.0);
82+
}
7983
}
8084
}
8185

src/hyperlight_common/src/flatbuffers/hyperlight/generated/guest_error_generated.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,10 @@ impl<'a> flatbuffers::Follow<'a> for GuestError<'a> {
2121
type Inner = GuestError<'a>;
2222
#[inline]
2323
unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
24-
Self {
25-
_tab: flatbuffers::Table::new(buf, loc),
24+
unsafe {
25+
Self {
26+
_tab: flatbuffers::Table::new(buf, loc),
27+
}
2628
}
2729
}
2830
}
@@ -192,14 +194,14 @@ pub fn size_prefixed_root_as_guest_error_with_opts<'b, 'o>(
192194
/// # Safety
193195
/// Callers must trust the given bytes do indeed contain a valid `GuestError`.
194196
pub unsafe fn root_as_guest_error_unchecked(buf: &[u8]) -> GuestError {
195-
flatbuffers::root_unchecked::<GuestError>(buf)
197+
unsafe { flatbuffers::root_unchecked::<GuestError>(buf) }
196198
}
197199
#[inline]
198200
/// Assumes, without verification, that a buffer of bytes contains a size prefixed GuestError and returns it.
199201
/// # Safety
200202
/// Callers must trust the given bytes do indeed contain a valid size prefixed `GuestError`.
201203
pub unsafe fn size_prefixed_root_as_guest_error_unchecked(buf: &[u8]) -> GuestError {
202-
flatbuffers::size_prefixed_root_unchecked::<GuestError>(buf)
204+
unsafe { flatbuffers::size_prefixed_root_unchecked::<GuestError>(buf) }
203205
}
204206
#[inline]
205207
pub fn finish_guest_error_buffer<'a, 'b, A: flatbuffers::Allocator + 'a>(

src/hyperlight_common/src/flatbuffers/hyperlight/generated/guest_log_data_generated.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,10 @@ impl<'a> flatbuffers::Follow<'a> for GuestLogData<'a> {
2121
type Inner = GuestLogData<'a>;
2222
#[inline]
2323
unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
24-
Self {
25-
_tab: flatbuffers::Table::new(buf, loc),
24+
unsafe {
25+
Self {
26+
_tab: flatbuffers::Table::new(buf, loc),
27+
}
2628
}
2729
}
2830
}
@@ -288,14 +290,14 @@ pub fn size_prefixed_root_as_guest_log_data_with_opts<'b, 'o>(
288290
/// # Safety
289291
/// Callers must trust the given bytes do indeed contain a valid `GuestLogData`.
290292
pub unsafe fn root_as_guest_log_data_unchecked(buf: &[u8]) -> GuestLogData {
291-
flatbuffers::root_unchecked::<GuestLogData>(buf)
293+
unsafe { flatbuffers::root_unchecked::<GuestLogData>(buf) }
292294
}
293295
#[inline]
294296
/// Assumes, without verification, that a buffer of bytes contains a size prefixed GuestLogData and returns it.
295297
/// # Safety
296298
/// Callers must trust the given bytes do indeed contain a valid size prefixed `GuestLogData`.
297299
pub unsafe fn size_prefixed_root_as_guest_log_data_unchecked(buf: &[u8]) -> GuestLogData {
298-
flatbuffers::size_prefixed_root_unchecked::<GuestLogData>(buf)
300+
unsafe { flatbuffers::size_prefixed_root_unchecked::<GuestLogData>(buf) }
299301
}
300302
#[inline]
301303
pub fn finish_guest_log_data_buffer<'a, 'b, A: flatbuffers::Allocator + 'a>(

src/hyperlight_common/src/flatbuffers/hyperlight/generated/hlbool_generated.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,10 @@ impl<'a> flatbuffers::Follow<'a> for hlbool<'a> {
2121
type Inner = hlbool<'a>;
2222
#[inline]
2323
unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
24-
Self {
25-
_tab: flatbuffers::Table::new(buf, loc),
24+
unsafe {
25+
Self {
26+
_tab: flatbuffers::Table::new(buf, loc),
27+
}
2628
}
2729
}
2830
}

src/hyperlight_common/src/flatbuffers/hyperlight/generated/hldouble_generated.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,10 @@ impl<'a> flatbuffers::Follow<'a> for hldouble<'a> {
2121
type Inner = hldouble<'a>;
2222
#[inline]
2323
unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
24-
Self {
25-
_tab: flatbuffers::Table::new(buf, loc),
24+
unsafe {
25+
Self {
26+
_tab: flatbuffers::Table::new(buf, loc),
27+
}
2628
}
2729
}
2830
}

src/hyperlight_common/src/flatbuffers/hyperlight/generated/hlfloat_generated.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,10 @@ impl<'a> flatbuffers::Follow<'a> for hlfloat<'a> {
2121
type Inner = hlfloat<'a>;
2222
#[inline]
2323
unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
24-
Self {
25-
_tab: flatbuffers::Table::new(buf, loc),
24+
unsafe {
25+
Self {
26+
_tab: flatbuffers::Table::new(buf, loc),
27+
}
2628
}
2729
}
2830
}

src/hyperlight_common/src/flatbuffers/hyperlight/generated/hlint_generated.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,10 @@ impl<'a> flatbuffers::Follow<'a> for hlint<'a> {
2121
type Inner = hlint<'a>;
2222
#[inline]
2323
unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
24-
Self {
25-
_tab: flatbuffers::Table::new(buf, loc),
24+
unsafe {
25+
Self {
26+
_tab: flatbuffers::Table::new(buf, loc),
27+
}
2628
}
2729
}
2830
}

0 commit comments

Comments
 (0)