File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ extern crate log;
8
8
#[ macro_use]
9
9
extern crate alloc;
10
10
11
- use alloc:: string:: String ;
11
+ use alloc:: string:: ToString ;
12
12
use uefi:: prelude:: * ;
13
13
use uefi:: proto:: console:: serial:: Serial ;
14
14
use uefi_services:: { print, println} ;
@@ -24,10 +24,9 @@ fn efi_main(image: Handle, mut st: SystemTable<Boot>) -> Status {
24
24
25
25
// unit tests here
26
26
27
- // output firmware-vendor (CStr16 to Rust string)
28
- let mut buf = String :: new ( ) ;
29
- st. firmware_vendor ( ) . as_str_in_buf ( & mut buf) . unwrap ( ) ;
30
- info ! ( "Firmware Vendor: {}" , buf. as_str( ) ) ;
27
+ let firmware_vendor = st. firmware_vendor ( ) ;
28
+ info ! ( "Firmware Vendor: {}" , firmware_vendor) ;
29
+ assert_eq ! ( firmware_vendor. to_string( ) , "EDK II" ) ;
31
30
32
31
// Test print! and println! macros.
33
32
let ( print, println) = ( "print!" , "println!" ) ; // necessary for clippy to ignore
You can’t perform that action at this time.
0 commit comments