some_operation(&arg) .with_context(|| format!("Some operation failed: {arg}"))?;
some_operation(&arg) .context("Some operation failed")?;
some_operation(&arg)?;
Whether that's better or worse than the Go snippet is something I'll let the reader decide.
Whether that's better or worse than the Go snippet is something I'll let the reader decide.