print error in example instead of quitting

embedded-hal-1.0
Chris 2018-10-10 20:26:59 +02:00
parent 2e2e70c59c
commit d0ac29ed90
1 changed files with 5 additions and 1 deletions

View File

@ -61,8 +61,12 @@ impl<'a> InputPin for HackInputPin<'a> {
* BE CAREFUL: this wasn't tested yet, and the pins are also not choosen correctly (just some random ones atm) * BE CAREFUL: this wasn't tested yet, and the pins are also not choosen correctly (just some random ones atm)
* *
*/ */
fn main() {
run().map_err(|e| println!("{:?}", e.to_string()));
}
fn main() -> Result<(), std::io::Error> {
fn run() -> Result<(), std::io::Error> {
// Configure SPI // Configure SPI
// Settings are taken from // Settings are taken from