We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
.ok_or_else(|| anyhow::anyhow!
.context(
1 parent 83be5a7 commit 299f2a7Copy full SHA for 299f2a7
src/github.rs
@@ -1712,13 +1712,13 @@ impl Repository {
1712
}
1713
let target = data
1714
.data
1715
- .ok_or_else(|| anyhow::anyhow!("No data returned."))?
+ .context("No data returned.")?
1716
.repository
1717
- .ok_or_else(|| anyhow::anyhow!("No repository."))?
+ .context("No repository.")?
1718
.ref_
1719
- .ok_or_else(|| anyhow::anyhow!("No ref."))?
+ .context("No ref.")?
1720
.target
1721
- .ok_or_else(|| anyhow::anyhow!("No target."))?;
+ .context("No target.")?;
1722
let commit = match target {
1723
GitObject::Commit(commit) => commit,
1724
_ => anyhow::bail!("unexpected target type {target:?}"),
0 commit comments