Skip to content

Commit f3b5b70

Browse files
committed
set fmt style-edition to 2024
Signed-off-by: Simon Davies <[email protected]>
1 parent da18af6 commit f3b5b70

Some content is hidden

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

77 files changed

+241
-227
lines changed

fuzz/fuzz_targets/host_print.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use hyperlight_host::sandbox_state::sandbox::EvolvableSandbox;
77
use hyperlight_host::sandbox_state::transition::Noop;
88
use hyperlight_host::{MultiUseSandbox, UninitializedSandbox};
99
use hyperlight_testing::simple_guest_for_fuzzing_as_string;
10-
use libfuzzer_sys::{fuzz_target, Corpus};
10+
use libfuzzer_sys::{Corpus, fuzz_target};
1111

1212
static SANDBOX: OnceLock<Mutex<MultiUseSandbox>> = OnceLock::new();
1313

rustfmt.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ group_imports = "StdExternalCrate" # create three groups for std, external and l
44
# Merge imports from the same module
55
# See: https://rust-lang.github.io/rustfmt/?version=v1.4.38&search=#imports_granularity
66
imports_granularity = "Module"
7-
style_edition = "2021"
7+
style_edition = "2024"

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,10 +14,10 @@ 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
#[cfg(feature = "tracing")]
20-
use tracing::{instrument, Span};
20+
use tracing::{Span, instrument};
2121

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

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_common/src/outb.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ limitations under the License.
1616

1717
use core::convert::TryFrom;
1818

19-
use anyhow::{anyhow, Error};
19+
use anyhow::{Error, anyhow};
2020

2121
/// Exception codes for the x86 architecture.
2222
/// These are helpful to identify the type of exception that occurred

src/hyperlight_guest/src/exit.rs

Lines changed: 1 addition & 1 deletion
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, CStr};
18+
use core::ffi::{CStr, c_char};
1919

2020
use hyperlight_common::outb::OutBAction;
2121

0 commit comments

Comments
 (0)