Skip to content

Commit

Permalink
prepend failures with "failed to" instead of "unable to"
Browse files Browse the repository at this point in the history
  • Loading branch information
tmplt committed Jun 16, 2021
1 parent d65e00d commit 7e2ac11
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cargo-rtic-trace/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,13 @@ fn main() -> Result<()> {
let probe = probes[0].open().context("Unable to open first probe")?;
let mut session = probe
.attach("stm32f401re")
.context("Unable to attach to stm32f401re")?;
.context("Failed to attach to stm32f401re")?;
let trace_tty = serial::configure(&opt.serial)
.with_context(|| format!("Failed to configure {}", opt.serial))?;

// Ensure we have a working cargo
let mut cargo = building::CargoWrapper::new(opt.cargo_flags)
.context("Unable to setup cargo")?;
.context("Failed to setup cargo")?;

// Build the wanted binary
let artifact = cargo.build(
Expand Down Expand Up @@ -94,7 +94,7 @@ fn main() -> Result<()> {
&artifact.executable.unwrap(),
flashing::Format::Elf,
)
.context("Unable to flash target firmware")?;
.context("Failed to flash target firmware")?;
println!("Flashed.");

// TODO sample a timestamp here
Expand Down

0 comments on commit 7e2ac11

Please sign in to comment.