Closed
Description
Function it was working on when it crashed (apologies, this is in the middle of a refactor so it's a mess; I can provide more context or try to boil it down if needed):
unsafe fn draw(&self) {
let color_alg: &Fn(Complex, usize) -> usize = if (self.power - 2.0).abs() < 0.01 {
&|c, i| self.get_color(c, i)
} else {
&|c, i| self.get_color_generic(c, i)
};
self.height = if !stdscr.is_null() {
i32::from((*stdscr)._maxy) + 1i32
} else {
-1i32
};
self.width = if !stdscr.is_null() {
i32::from((*stdscr)._maxx) + 1i32
} else {
-1i32
};
let mut i: i32 = 0i32;
loop {
if i >= self.height {
break;
}
let mut j: i32 = 0i32;
loop {
if j >= self.width {
break;
}
if wmove(stdscr, i, j) != -1i32 {
waddch(
stdscr,
usize::from(self.colors[usize::from(color_alg(self.complex_value(i, j), self.iter))]),
);
}
j += 1;
}
i += 1;
}
wrefresh(stdscr);
}
Metadata
Metadata
Assignees
Labels
Area: Non-lexical lifetimes (NLL)Area: The borrow checkerCategory: This is a bug.Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Working towards the "invalid code does not compile" goalHigh priorityRelevant to the compiler team, which will review and decide on the PR/issue.Performance or correctness regression from stable to beta.