Skip to content

Commit 17ef1b8

Browse files
committed
2024 edition cargo fmt
Signed-off-by: Ludvig Liljenberg <[email protected]>
1 parent ade8372 commit 17ef1b8

File tree

97 files changed

+305
-285
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

97 files changed

+305
-285
lines changed

src/hyperlight_common/src/flatbuffer_wrappers/function_call.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,18 @@ limitations under the License.
1717
use alloc::string::{String, ToString};
1818
use alloc::vec::Vec;
1919

20-
use anyhow::{bail, Error, Result};
21-
use flatbuffers::{size_prefixed_root, WIPOffset};
20+
use anyhow::{Error, Result, bail};
21+
use flatbuffers::{WIPOffset, size_prefixed_root};
2222
#[cfg(feature = "tracing")]
23-
use tracing::{instrument, Span};
23+
use tracing::{Span, instrument};
2424

2525
use super::function_types::{ParameterValue, ReturnType};
2626
use crate::flatbuffers::hyperlight::generated::{
27-
hlbool, hlboolArgs, hldouble, hldoubleArgs, hlfloat, hlfloatArgs, hlint, hlintArgs, hllong,
28-
hllongArgs, hlstring, hlstringArgs, hluint, hluintArgs, hlulong, hlulongArgs, hlvecbytes,
29-
hlvecbytesArgs, FunctionCall as FbFunctionCall, FunctionCallArgs as FbFunctionCallArgs,
27+
FunctionCall as FbFunctionCall, FunctionCallArgs as FbFunctionCallArgs,
3028
FunctionCallType as FbFunctionCallType, Parameter, ParameterArgs,
31-
ParameterValue as FbParameterValue,
29+
ParameterValue as FbParameterValue, hlbool, hlboolArgs, hldouble, hldoubleArgs, hlfloat,
30+
hlfloatArgs, hlint, hlintArgs, hllong, hllongArgs, hlstring, hlstringArgs, hluint, hluintArgs,
31+
hlulong, hlulongArgs, hlvecbytes, hlvecbytesArgs,
3232
};
3333

3434
/// The type of function call.

src/hyperlight_common/src/flatbuffer_wrappers/function_types.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,18 @@ limitations under the License.
1717
use alloc::string::{String, ToString};
1818
use alloc::vec::Vec;
1919

20-
use anyhow::{anyhow, bail, Error, Result};
20+
use anyhow::{Error, Result, anyhow, bail};
2121
use flatbuffers::size_prefixed_root;
2222
#[cfg(feature = "tracing")]
23-
use tracing::{instrument, Span};
23+
use tracing::{Span, instrument};
2424

2525
use crate::flatbuffers::hyperlight::generated::{
26-
hlbool, hlboolArgs, hldouble, hldoubleArgs, hlfloat, hlfloatArgs, hlint, hlintArgs, hllong,
27-
hllongArgs, hlsizeprefixedbuffer, hlsizeprefixedbufferArgs, hlstring, hlstringArgs, hluint,
28-
hluintArgs, hlulong, hlulongArgs, hlvoid, hlvoidArgs,
2926
FunctionCallResult as FbFunctionCallResult, FunctionCallResultArgs as FbFunctionCallResultArgs,
3027
Parameter, ParameterType as FbParameterType, ParameterValue as FbParameterValue,
31-
ReturnType as FbReturnType, ReturnValue as FbReturnValue,
28+
ReturnType as FbReturnType, ReturnValue as FbReturnValue, hlbool, hlboolArgs, hldouble,
29+
hldoubleArgs, hlfloat, hlfloatArgs, hlint, hlintArgs, hllong, hllongArgs, hlsizeprefixedbuffer,
30+
hlsizeprefixedbufferArgs, hlstring, hlstringArgs, hluint, hluintArgs, hlulong, hlulongArgs,
31+
hlvoid, hlvoidArgs,
3232
};
3333

3434
/// Supported parameter types with values for function calling.

src/hyperlight_common/src/flatbuffer_wrappers/guest_error.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ use alloc::vec::Vec;
2222
use anyhow::{Error, Result};
2323
use flatbuffers::size_prefixed_root;
2424
#[cfg(feature = "tracing")]
25-
use tracing::{instrument, Span};
25+
use tracing::{Span, instrument};
2626

2727
use crate::flatbuffers::hyperlight::generated::{
2828
ErrorCode as FbErrorCode, GuestError as FbGuestError, GuestErrorArgs,

src/hyperlight_common/src/flatbuffer_wrappers/guest_log_data.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ limitations under the License.
1717
use alloc::string::{String, ToString};
1818
use alloc::vec::Vec;
1919

20-
use anyhow::{anyhow, Error, Result};
20+
use anyhow::{Error, Result, anyhow};
2121
use flatbuffers::size_prefixed_root;
2222
#[cfg(feature = "tracing")]
23-
use tracing::{instrument, Span};
23+
use tracing::{Span, instrument};
2424

2525
use super::guest_log_level::LogLevel;
2626
use crate::flatbuffers::hyperlight::generated::{

src/hyperlight_common/src/flatbuffer_wrappers/guest_log_level.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ See the License for the specific language governing permissions and
1414
limitations under the License.
1515
*/
1616

17-
use anyhow::{bail, Error, Result};
17+
use anyhow::{Error, Result, bail};
1818
use log::Level;
1919
use strum::EnumIter;
2020
#[cfg(feature = "tracing")]
21-
use tracing::{instrument, Span};
21+
use tracing::{Span, instrument};
2222

2323
use crate::flatbuffers::hyperlight::generated::LogLevel as FbLogLevel;
2424

src/hyperlight_common/src/flatbuffer_wrappers/host_function_definition.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ limitations under the License.
1717
use alloc::string::{String, ToString};
1818
use alloc::vec::Vec;
1919

20-
use anyhow::{anyhow, Error, Result};
20+
use anyhow::{Error, Result, anyhow};
2121
use flatbuffers::{FlatBufferBuilder, WIPOffset};
2222
#[cfg(feature = "tracing")]
23-
use tracing::{instrument, Span};
23+
use tracing::{Span, instrument};
2424

2525
use super::function_types::{ParameterType, ReturnType};
2626
use crate::flatbuffers::hyperlight::generated::{

src/hyperlight_common/src/flatbuffer_wrappers/host_function_details.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ limitations under the License.
1717
use alloc::vec::Vec;
1818

1919
use anyhow::{Error, Result};
20-
use flatbuffers::{size_prefixed_root, WIPOffset};
20+
use flatbuffers::{WIPOffset, size_prefixed_root};
2121
#[cfg(feature = "tracing")]
22-
use tracing::{instrument, Span};
22+
use tracing::{Span, instrument};
2323

2424
use super::host_function_definition::HostFunctionDefinition;
2525
use crate::flatbuffers::hyperlight::generated::{

src/hyperlight_common/src/flatbuffer_wrappers/util.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@ use alloc::vec::Vec;
1919
use flatbuffers::FlatBufferBuilder;
2020

2121
use crate::flatbuffers::hyperlight::generated::{
22-
hlbool as Fbhlbool, hlboolArgs as FbhlboolArgs, hldouble as Fbhldouble,
23-
hldoubleArgs as FbhldoubleArgs, hlfloat as Fbhlfloat, hlfloatArgs as FbhlfloatArgs,
24-
hlint as Fbhlint, hlintArgs as FbhlintArgs, hllong as Fbhllong, hllongArgs as FbhllongArgs,
25-
hlsizeprefixedbuffer as Fbhlsizeprefixedbuffer,
22+
FunctionCallResult as FbFunctionCallResult, FunctionCallResultArgs as FbFunctionCallResultArgs,
23+
ReturnValue as FbReturnValue, hlbool as Fbhlbool, hlboolArgs as FbhlboolArgs,
24+
hldouble as Fbhldouble, hldoubleArgs as FbhldoubleArgs, hlfloat as Fbhlfloat,
25+
hlfloatArgs as FbhlfloatArgs, hlint as Fbhlint, hlintArgs as FbhlintArgs, hllong as Fbhllong,
26+
hllongArgs as FbhllongArgs, hlsizeprefixedbuffer as Fbhlsizeprefixedbuffer,
2627
hlsizeprefixedbufferArgs as FbhlsizeprefixedbufferArgs, hlstring as Fbhlstring,
2728
hlstringArgs as FbhlstringArgs, hluint as Fbhluint, hluintArgs as FbhluintArgs,
2829
hlulong as Fbhlulong, hlulongArgs as FbhlulongArgs, hlvoid as Fbhlvoid,
29-
hlvoidArgs as FbhlvoidArgs, FunctionCallResult as FbFunctionCallResult,
30-
FunctionCallResultArgs as FbFunctionCallResultArgs, ReturnValue as FbReturnValue,
30+
hlvoidArgs as FbhlvoidArgs,
3131
};
3232

3333
/// Flatbuffer-encodes the given value

src/hyperlight_guest/src/entrypoint.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ limitations under the License.
1515
*/
1616

1717
use core::arch::asm;
18-
use core::ffi::{c_char, c_void, CStr};
18+
use core::ffi::{CStr, c_char, c_void};
1919
use core::ptr::copy_nonoverlapping;
2020

2121
use hyperlight_common::mem::{HyperlightPEB, RunMode};
@@ -26,7 +26,7 @@ use crate::gdt::load_gdt;
2626
use crate::guest_error::reset_error;
2727
use crate::guest_function_call::dispatch_function;
2828
use crate::guest_logger::init_logger;
29-
use crate::host_function_call::{outb, OutBAction};
29+
use crate::host_function_call::{OutBAction, outb};
3030
use crate::idtr::load_idt;
3131
use crate::{
3232
__security_cookie, HEAP_ALLOCATOR, MIN_STACK_ADDRESS, OS_PAGE_SIZE, OUTB_PTR,

src/hyperlight_guest/src/guest_error.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@ limitations under the License.
1616

1717
use alloc::string::{String, ToString};
1818
use alloc::vec::Vec;
19-
use core::ffi::{c_char, CStr};
19+
use core::ffi::{CStr, c_char};
2020

2121
use hyperlight_common::flatbuffer_wrappers::guest_error::{ErrorCode, GuestError};
2222
use log::error;
2323

24-
use crate::entrypoint::halt;
25-
use crate::host_function_call::{outb, OutBAction};
2624
use crate::P_PEB;
25+
use crate::entrypoint::halt;
26+
use crate::host_function_call::{OutBAction, outb};
2727

2828
pub(crate) fn write_error(error_code: ErrorCode, message: Option<&str>) {
2929
let guest_error = GuestError::new(

0 commit comments

Comments
 (0)