Skip to content

Commit 6098528

Browse files
committed
bitreq: Rename MINREQ_TIMEOUT to BITREQ_TIMEOUT
Stale name since we renamed the crate to `bitreq`. Fix a few instances of `s/minreq/bitreq` missed when forking.
1 parent b09be8b commit 6098528

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

bitreq/src/connection.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ pub struct AsyncConnection {
8787
impl AsyncConnection {
8888
/// Creates a new `AsyncConnection`.
8989
pub(crate) fn new(request: ParsedRequest) -> AsyncConnection {
90-
let timeout = request.config.timeout.or_else(|| match env::var("MINREQ_TIMEOUT") {
90+
let timeout = request.config.timeout.or_else(|| match env::var("BITREQ_TIMEOUT") {
9191
Ok(t) => t.parse::<u64>().ok(),
9292
Err(_) => None,
9393
});
@@ -128,7 +128,7 @@ impl Connection {
128128
/// Creates a new `Connection`. See [Request] and [ParsedRequest]
129129
/// for specifics about *what* is being sent.
130130
pub(crate) fn new(request: ParsedRequest) -> Connection {
131-
let timeout = request.config.timeout.or_else(|| match env::var("MINREQ_TIMEOUT") {
131+
let timeout = request.config.timeout.or_else(|| match env::var("BITREQ_TIMEOUT") {
132132
Ok(t) => t.parse::<u64>().ok(),
133133
Err(_) => None,
134134
});

bitreq/src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -207,16 +207,16 @@
207207
//! ```text,ignore
208208
//! bitreq::get("/").with_timeout(8).send();
209209
//! ```
210-
//! - Set the environment variable `MINREQ_TIMEOUT` to the desired
210+
//! - Set the environment variable `BITREQ_TIMEOUT` to the desired
211211
//! amount of seconds until timeout. Ie. if you have a program called
212212
//! `foo` that uses bitreq, and you want all the requests made by that
213213
//! program to timeout in 8 seconds, you launch the program like so:
214214
//! ```text,ignore
215-
//! $ MINREQ_TIMEOUT=8 ./foo
215+
//! $ BITREQ_TIMEOUT=8 ./foo
216216
//! ```
217217
//! Or add the following somewhere before the requests in the code.
218218
//! ```
219-
//! std::env::set_var("MINREQ_TIMEOUT", "8");
219+
//! std::env::set_var("BITREQ_TIMEOUT", "8");
220220
//! ```
221221
//! If the timeout is set with `with_timeout`, the environment
222222
//! variable will be ignored.

0 commit comments

Comments
 (0)