message: Update examples/temperature.rs
diff: @@ -26,23 +26,14 @@ fn main() {
  loop {
  match Temperature::read_temperature_sync() {
  Ok(temp_val) => {
  - if temp_val >= 0 {
  writeln!(
  Console::writer(),
  - "Temperature: {}.{}*C\n",
  - temp_val / 100,
  - temp_val % 100
  + "Temperature: {}{}.{}*C\n",
  + if temp_val > 0 { "" } else { "-" },
  + i32::abs(temp_val) / 100,
  + i32::abs(temp_val) % 100
  )
  .unwrap()
  - } else {
  - writeln!(
  - Console::writer(),
  - "Temperature: -{}.{}*C\n",
  - (0 - temp_val) / 100,
  - (0 - temp_val) % 100
  - )
  - .unwrap()
  - }
  }
  Err(_) => writeln!(Console::writer(), "error while reading temperature",).unwrap(),
  }
  