mirror of
https://github.com/italicsjenga/agb.git
synced 2024-12-24 00:31:34 +11:00
Make doctest in interrupt.rs work
This commit is contained in:
parent
5e317ef192
commit
8929486387
|
@ -235,10 +235,17 @@ fn interrupt_to_root(interrupt: Interrupt) -> &'static InterruptRoot {
|
||||||
///
|
///
|
||||||
/// # Examples
|
/// # Examples
|
||||||
///
|
///
|
||||||
/// ```
|
/// ```rust,no_run
|
||||||
/// let _a = add_interrupt_handler(Interrupt::VBlank, |_: &CriticalSection| {
|
/// # #![no_std]
|
||||||
/// println!("Woah there! There's been a vblank!");
|
/// # #![no_main]
|
||||||
|
/// use bare_metal::CriticalSection;
|
||||||
|
///
|
||||||
|
/// # fn foo() {
|
||||||
|
/// # use agb::interrupt::{add_interrupt_handler, Interrupt};
|
||||||
|
/// let _a = add_interrupt_handler(Interrupt::VBlank, |_: CriticalSection| {
|
||||||
|
/// agb::println!("Woah there! There's been a vblank!");
|
||||||
/// });
|
/// });
|
||||||
|
/// # }
|
||||||
/// ```
|
/// ```
|
||||||
pub fn add_interrupt_handler<'a>(
|
pub fn add_interrupt_handler<'a>(
|
||||||
interrupt: Interrupt,
|
interrupt: Interrupt,
|
||||||
|
|
Loading…
Reference in a new issue