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.
.context()
1 parent 8ce91eb commit 88df08fCopy full SHA for 88df08f
src/tests/server_binary.rs
@@ -1,6 +1,6 @@
1
use crate::builders::CrateBuilder;
2
use crate::util::{ChaosProxy, FreshSchema};
3
-use anyhow::Error;
+use anyhow::{Context, Error};
4
use cargo_registry::models::{NewUser, User};
5
use diesel::prelude::*;
6
use reqwest::blocking::{Client, Response};
@@ -138,7 +138,7 @@ impl ServerBin {
138
// - the server binary doesn't print "listening on port {port}" anymore
139
let port: u16 = port_recv
140
.recv_timeout(Duration::from_secs(SERVER_BOOT_TIMEOUT_SECONDS))
141
- .map_err(|_| anyhow::anyhow!("the server took too much time to initialize"))?
+ .context("the server took too much time to initialize")?
142
.parse()?;
143
144
let http = Client::builder()
0 commit comments