1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2024-12-03 11:09:12 +02:00

Actually use panic_halt in example.

This commit is contained in:
Andrew Walbran 2023-02-02 13:24:32 +00:00
parent d84c93010a
commit 9068b63e76

View File

@ -17,9 +17,9 @@
#![no_std]
extern crate alloc;
extern crate panic_halt as _;
use alloc::{string::ToString, vec::Vec};
use core::panic::PanicInfo;
use buddy_system_allocator::LockedHeap;
#[global_allocator]
@ -40,9 +40,3 @@ pub fn entry() {
let mut v = Vec::new();
v.push("A string".to_string());
}
// ANCHOR_END: Alloc
#[panic_handler]
fn panic(_panic: &PanicInfo) -> ! {
loop {}
}