Thanks for pointing it out. I actually haven't tested for that case, however, it seems that dividing by zero in floating point (f32 or f64) does not panic in Rust. Instead, it results in a NaN (Not a Number) and continues operation. Here's where I found some insight:
Christian Foucher
Industrial software engineer (embedded and computer platforms). Rust enthusiast.
Hello Omar, Do you know what happens when the adc.read function returns 0 ? Temperature computation will do a floating division by 0 (=+INF). I have tested on Wokwi, it seems OK (Temperature -273.15 Celcius). Rust follows the IEEE 754 rules.