@@ -81,20 +81,23 @@ pub use device_path_gen::{
81
81
acpi, bios_boot_spec, end, hardware, media, messaging, DevicePathNodeEnum ,
82
82
} ;
83
83
84
+ use crate :: proto:: { unsafe_protocol, ProtocolPointer } ;
84
85
use core:: ffi:: c_void;
85
86
use core:: fmt:: { self , Debug , Display , Formatter } ;
86
87
use core:: mem;
87
88
use core:: ops:: Deref ;
88
89
use ptr_meta:: Pointee ;
89
- use uefi:: table:: boot:: ScopedProtocol ;
90
- #[ cfg( feature = "alloc" ) ]
91
- use { alloc:: borrow:: ToOwned , alloc:: boxed:: Box , uefi:: CString16 } ;
92
90
93
- use crate :: prelude:: BootServices ;
94
- use crate :: proto:: device_path:: text:: { AllowShortcuts , DevicePathToText , DisplayOnly } ;
95
- use crate :: proto:: { unsafe_protocol, ProtocolPointer } ;
96
- use crate :: table:: boot:: { OpenProtocolAttributes , OpenProtocolParams , SearchType } ;
97
- use crate :: Identify ;
91
+ #[ cfg( feature = "alloc" ) ]
92
+ use {
93
+ crate :: proto:: device_path:: text:: { AllowShortcuts , DevicePathToText , DisplayOnly } ,
94
+ crate :: table:: boot:: {
95
+ BootServices , OpenProtocolAttributes , OpenProtocolParams , ScopedProtocol , SearchType ,
96
+ } ,
97
+ crate :: { CString16 , Identify } ,
98
+ alloc:: borrow:: ToOwned ,
99
+ alloc:: boxed:: Box ,
100
+ } ;
98
101
99
102
opaque_type ! {
100
103
/// Opaque type that should be used to represent a pointer to a
@@ -807,6 +810,7 @@ impl core::error::Error for DevicePathToTextError {
807
810
808
811
/// Helper function to open the [`DevicePathToText`] protocol using the boot
809
812
/// services.
813
+ #[ cfg( feature = "alloc" ) ]
810
814
fn open_text_protocol (
811
815
bs : & BootServices ,
812
816
) -> Result < ScopedProtocol < DevicePathToText > , DevicePathToTextError > {
0 commit comments