Skip to content

Commit 63bf49a

Browse files
committed
make clippy happy
Signed-off-by: Jorge Prendes <jorge.prendes@gmail.com>
1 parent 787d537 commit 63bf49a

File tree

3 files changed

+5
-0
lines changed

3 files changed

+5
-0
lines changed

src/hyperlight_common/src/flatbuffer_wrappers/guest_trace_data.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,7 @@ impl<T: Fn(&[u8])> EventsEncoder for EventsBatchEncoderGeneric<T> {
177177
// - If the estimate is too low, the FlatBuffer builder reallocates as needed.
178178
let estimated_size = estimate_event(event);
179179
let serialized = Vec::with_capacity(estimated_size);
180+
#[allow(clippy::unwrap_used)]
180181
let serialized = encode_extend(event, serialized).unwrap();
181182

182183
// Check if adding this event would exceed capacity
@@ -213,6 +214,7 @@ impl<T: Fn(&[u8])> EventsEncoder for EventsBatchEncoderGeneric<T> {
213214
}
214215

215216
pub fn estimate_event(event: &GuestEvent) -> usize {
217+
#[allow(clippy::unwrap_used)]
216218
encoded_size(event).unwrap()
217219
}
218220

src/hyperlight_common/src/flatbuffer_wrappers/util.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ use crate::func::ReturnValue;
2424
/// Flatbuffer-encodes the given value
2525
pub fn get_flatbuffer_result<T: Into<ReturnValue>>(val: T) -> Vec<u8> {
2626
let result = FunctionCallResult::new(Ok(val.into()));
27+
#[allow(clippy::unwrap_used)]
2728
encode(&result).unwrap()
2829
}
2930

@@ -79,6 +80,7 @@ pub fn estimate_flatbuffer_capacity(function_name: &str, args: &[ParameterValue]
7980
crate::flatbuffer_wrappers::function_types::ReturnType::Void,
8081
);
8182

83+
#[allow(clippy::unwrap_used)]
8284
let estimated_capacity = encoded_size(&dummy).unwrap();
8385

8486
/*

src/hyperlight_host/src/sandbox/initialized_multi_use.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -592,6 +592,7 @@ impl MultiUseSandbox {
592592
);
593593

594594
let buffer = Vec::with_capacity(estimated_capacity);
595+
#[allow(clippy::unwrap_used)]
595596
let buffer = encode_extend(&fc, buffer).unwrap();
596597

597598
self.mem_mgr.write_guest_function_call(&buffer)?;

0 commit comments

Comments
 (0)