Skip to content

Commit 763ec2d

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

File tree

99 files changed

+307
-287
lines changed

Some content is hidden

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

99 files changed

+307
-287
lines changed

fuzz/fuzz_targets/host_call.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ limitations under the License.
1919
use std::sync::{Mutex, OnceLock};
2020

2121
use hyperlight_host::func::{ParameterValue, ReturnType};
22-
use hyperlight_host::sandbox::uninitialized::GuestBinary;
2322
use hyperlight_host::sandbox::SandboxConfiguration;
23+
use hyperlight_host::sandbox::uninitialized::GuestBinary;
2424
use hyperlight_host::sandbox_state::sandbox::EvolvableSandbox;
2525
use hyperlight_host::sandbox_state::transition::Noop;
2626
use hyperlight_host::{HyperlightError, MultiUseSandbox, UninitializedSandbox};

fuzz/fuzz_targets/host_print.rs

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

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

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

0 commit comments

Comments
 (0)