From b4006d7d90d36b9d4995105f3ab15addcdb462eb Mon Sep 17 00:00:00 2001 From: Gitea CI Date: Fri, 12 Jan 2024 14:42:11 +0000 Subject: [PATCH] automatic cargo CI changes --- members/panic-calm/src/main.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/members/panic-calm/src/main.rs b/members/panic-calm/src/main.rs index 708dbb0..acc5b3b 100644 --- a/members/panic-calm/src/main.rs +++ b/members/panic-calm/src/main.rs @@ -1,11 +1,13 @@ -use std::{io::Write, panic}; +use std::panic; fn inner() { let mut counter = 0u8; loop { // will eventually panic when overflowing? counter += 1; print!("{counter}\t"); - if counter % 8 == 0 { println!() } + if counter % 8 == 0 { + println!() + } if counter == 255 { // so panic will look fancier :) println!() @@ -22,6 +24,7 @@ fn main() { dbg!(&panic); dbg!(&panic.as_ref().unwrap_err().type_id()); println!("recovered from a panic"); + } else { + println!("no panic on the titanic") } - else {println!("no panic on the titanic")} }