@@ -24,10 +24,10 @@ impl Input {
24
24
25
25
/// Reads the next keystroke from the input device, if any.
26
26
///
27
- /// Use [`wait_for_key_event`] with the [`BootServices ::wait_for_event`]
27
+ /// Use [`wait_for_key_event`] with the [`boot ::wait_for_event`]
28
28
/// interface in order to wait for a key to be pressed.
29
29
///
30
- /// [`BootServices ::wait_for_event`]: uefi::table:: boot::BootServices ::wait_for_event
30
+ /// [`boot ::wait_for_event`]: crate:: boot::wait_for_event
31
31
/// [`wait_for_key_event`]: Self::wait_for_key_event
32
32
///
33
33
/// # Errors
@@ -39,16 +39,13 @@ impl Input {
39
39
/// ```
40
40
/// use log::info;
41
41
/// use uefi::proto::console::text::{Input, Key, ScanCode};
42
- /// use uefi::table::boot::BootServices;
43
- /// use uefi::{Char16, Result, ResultExt};
42
+ /// use uefi::{boot, Char16, Result, ResultExt};
44
43
///
45
- /// fn read_keyboard_events(boot_services: &BootServices, input: &mut Input) -> Result {
44
+ /// fn read_keyboard_events(input: &mut Input) -> Result {
46
45
/// loop {
47
46
/// // Pause until a keyboard event occurs.
48
47
/// let mut events = unsafe { [input.wait_for_key_event().unwrap()] };
49
- /// boot_services
50
- /// .wait_for_event(&mut events)
51
- /// .discard_errdata()?;
48
+ /// boot::wait_for_event(&mut events).discard_errdata()?;
52
49
///
53
50
/// let u_key = Char16::try_from('u').unwrap();
54
51
/// match input.read_key()? {
@@ -79,8 +76,10 @@ impl Input {
79
76
}
80
77
}
81
78
82
- /// Event to be used with `BootServices ::wait_for_event()` in order to wait
79
+ /// Event to be used with [`boot ::wait_for_event`] in order to wait
83
80
/// for a key to be available
81
+ ///
82
+ /// [`boot::wait_for_event`]: crate::boot::wait_for_event
84
83
#[ must_use]
85
84
pub fn wait_for_key_event ( & self ) -> Option < Event > {
86
85
unsafe { Event :: from_ptr ( self . 0 . wait_for_key ) }
0 commit comments