@@ -43,7 +43,9 @@ use tokio::fs;
4343use crate :: {
4444 Tool ,
4545 run:: {
46- output_matcher:: { ByteStreamMatcher , StreamMatch , StreamMatchKind , compile_regexes, print_match_event} ,
46+ output_matcher:: {
47+ ByteStreamMatcher , StreamMatch , StreamMatchKind , compile_regexes, print_match_event,
48+ } ,
4749 ovmf_prebuilt:: { Arch , FileType , Prebuilt , Source } ,
4850 shell_init:: { ShellAutoInitMatcher , normalize_shell_init_config, spawn_delayed_send} ,
4951 } ,
@@ -173,8 +175,9 @@ async fn load_or_create_qemu_config(
173175
174176 let config_content = match fs:: read_to_string ( & config_path) . await {
175177 Ok ( content) => {
176- let mut config: QemuConfig = toml:: from_str ( & content)
177- . with_context ( || format ! ( "failed to parse QEMU config: {}" , config_path. display( ) ) ) ?;
178+ let mut config: QemuConfig = toml:: from_str ( & content) . with_context ( || {
179+ format ! ( "failed to parse QEMU config: {}" , config_path. display( ) )
180+ } ) ?;
178181 config. normalize ( & format ! ( "QEMU config {}" , config_path. display( ) ) ) ?;
179182 return Ok ( config) ;
180183 }
@@ -923,12 +926,8 @@ mod tests {
923926 std:: fs:: write ( tmp. path ( ) . join ( "qemu-aarch64.toml" ) , "" ) . unwrap ( ) ;
924927 std:: fs:: write ( tmp. path ( ) . join ( "qemu.toml" ) , "" ) . unwrap ( ) ;
925928
926- let result = resolve_qemu_config_path_in_dir (
927- tmp. path ( ) ,
928- Some ( Architecture :: Aarch64 ) ,
929- None ,
930- )
931- . unwrap ( ) ;
929+ let result =
930+ resolve_qemu_config_path_in_dir ( tmp. path ( ) , Some ( Architecture :: Aarch64 ) , None ) . unwrap ( ) ;
932931 assert_eq ! ( result, tmp. path( ) . join( "qemu-aarch64.toml" ) ) ;
933932 }
934933
@@ -938,8 +937,7 @@ mod tests {
938937 std:: fs:: write ( tmp. path ( ) . join ( ".qemu.toml" ) , "" ) . unwrap ( ) ;
939938
940939 let result =
941- resolve_qemu_config_path_in_dir ( tmp. path ( ) , Some ( Architecture :: Aarch64 ) , None )
942- . unwrap ( ) ;
940+ resolve_qemu_config_path_in_dir ( tmp. path ( ) , Some ( Architecture :: Aarch64 ) , None ) . unwrap ( ) ;
943941 assert_eq ! ( result, tmp. path( ) . join( ".qemu.toml" ) ) ;
944942 }
945943
@@ -948,8 +946,7 @@ mod tests {
948946 let tmp = TempDir :: new ( ) . unwrap ( ) ;
949947
950948 let result =
951- resolve_qemu_config_path_in_dir ( tmp. path ( ) , Some ( Architecture :: Aarch64 ) , None )
952- . unwrap ( ) ;
949+ resolve_qemu_config_path_in_dir ( tmp. path ( ) , Some ( Architecture :: Aarch64 ) , None ) . unwrap ( ) ;
953950 assert_eq ! ( result, tmp. path( ) . join( ".qemu-aarch64.toml" ) ) ;
954951 }
955952
0 commit comments