mirror of
https://github.com/ferrous-systems/embedded-trainings-2020.git
synced 2025-01-09 15:55:37 +00:00
respond to jorges reviw– use expect(unreachable) // reason
This commit is contained in:
parent
f502132139
commit
080e96d290
1 changed files with 1 additions and 1 deletions
|
@ -219,7 +219,7 @@ fn notmain() -> Result<i32, anyhow::Error> {
|
|||
}
|
||||
|
||||
let channel = rtt_res
|
||||
.unwrap() // using ? instead wouldn't show the user any helpful error message
|
||||
.expect("unreachable") // this block is only executed when rtt was successfully attached before
|
||||
.up_channels()
|
||||
.take(0)
|
||||
.ok_or_else(|| anyhow!("RTT up channel 0 not found"))?;
|
||||
|
|
Loading…
Reference in a new issue