@@ -2858,17 +2858,16 @@ fn update_sections_from_line(app: &mut AppState, raw_line: &str) {
28582858 } else if lower. contains ( "[!]" ) || lower. contains ( "[warning]" ) || lower. starts_with ( "warning: " ) {
28592859 sev = Some ( StepSeverity :: Warning ) ;
28602860 }
2861- if let Some ( sev_val) = sev {
2862- if let Some ( idx) = app. current_section {
2863- if let Some ( sec) = app. sections . get_mut ( idx) {
2864- // Upgrade severity if needed (Error overrides Warning)
2865- match ( sec. severity , sev_val) {
2866- ( StepSeverity :: Error , _) => { }
2867- ( StepSeverity :: Warning , StepSeverity :: Error ) => sec. severity = StepSeverity :: Error ,
2868- ( StepSeverity :: None , s) => sec. severity = s,
2869- _ => { }
2870- }
2871- }
2861+ if let Some ( sev_val) = sev
2862+ && let Some ( idx) = app. current_section
2863+ && let Some ( sec) = app. sections . get_mut ( idx)
2864+ {
2865+ // Upgrade severity if needed (Error overrides Warning)
2866+ match ( sec. severity , sev_val) {
2867+ ( StepSeverity :: Error , _) => { }
2868+ ( StepSeverity :: Warning , StepSeverity :: Error ) => sec. severity = StepSeverity :: Error ,
2869+ ( StepSeverity :: None , s) => sec. severity = s,
2870+ _ => { }
28722871 }
28732872 }
28742873
@@ -3000,10 +2999,10 @@ fn preload_sections_from_script(script_path: &PathBuf) -> Vec<SetupSection> {
30002999 }
30013000 // 3) Map to titles and build sections
30023001 for fname in called {
3003- if let Some ( title) = get_title_for_fn ( & fname) {
3004- if !out. iter ( ) . any ( |s| s. title == title) {
3005- out . push ( SetupSection { title , done : false , severity : StepSeverity :: None } ) ;
3006- }
3002+ if let Some ( title) = get_title_for_fn ( & fname)
3003+ && !out. iter ( ) . any ( |s| s. title == title)
3004+ {
3005+ out . push ( SetupSection { title , done : false , severity : StepSeverity :: None } ) ;
30073006 }
30083007 }
30093008 }
0 commit comments