Skip to content

Commit 1b832cc

Browse files
committed
fix fmt and clippy
Signed-off-by: Jorge Prendes <jorge.prendes@gmail.com>
1 parent 17a93a6 commit 1b832cc

3 files changed

Lines changed: 54 additions & 24 deletions

File tree

examples/guest/Cargo.lock

Lines changed: 47 additions & 20 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/guest/build.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ fn main() {
1515
.expect("Unable to generate bindings")
1616
.write_to_file(out_dir.join("bindings.rs"))
1717
.expect("Couldn't write bindings");
18-
}
18+
}

examples/guest/src/main.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,13 @@ extern crate alloc;
66
use alloc::format;
77
use alloc::vec::Vec;
88

9+
use hyperlight_common::flatbuffer_wrappers::function_call::*;
10+
use hyperlight_common::flatbuffer_wrappers::function_types::*;
911
use hyperlight_common::flatbuffer_wrappers::guest_error::ErrorCode;
10-
use hyperlight_common::flatbuffer_wrappers::{function_call::*, function_types::*, util::*};
12+
use hyperlight_common::flatbuffer_wrappers::util::*;
1113
use hyperlight_guest::error::{HyperlightGuestError, Result};
12-
use hyperlight_guest_bin::guest_function::{definition::*, register::*};
14+
use hyperlight_guest_bin::guest_function::definition::*;
15+
use hyperlight_guest_bin::guest_function::register::*;
1316

1417
mod ffi {
1518
#![allow(dead_code, non_camel_case_types)] // generated code
@@ -23,7 +26,7 @@ fn host_print(s: impl AsRef<[u8]>) -> i32 {
2326

2427
pub fn say_hello(func: &FunctionCall) -> Result<Vec<u8>> {
2528
let params = func.parameters.as_deref().unwrap_or_default();
26-
let Some(ParameterValue::String(name)) = params.get(0) else {
29+
let Some(ParameterValue::String(name)) = params.first() else {
2730
return Err(HyperlightGuestError::new(
2831
ErrorCode::GuestError,
2932
"Expected a string parameter".into(),

0 commit comments

Comments
 (0)