Make build work (#546)

The mbedtls example has caused problem in the main build a number of
times. By making it a standalone `cargo new --bin`, we can keep it in
the source tree as a good example but avoid having it break the main
build.

Also, fix some clippy lints.
This commit is contained in:
Martin Algesten
2022-09-29 17:29:32 +02:00
committed by GitHub
parent a367a82317
commit b0796c18f3
12 changed files with 27 additions and 11 deletions

View File

@@ -80,7 +80,7 @@ fn connection_reuse_with_408() {
// pulls from the pool. If for some reason the timed-out
// connection wasn't in the pool, we won't be testing what
// we thought we were testing.
let resp = agent.post(&url).send_string("hello".into()).unwrap();
let resp = agent.post(&url).send_string("hello").unwrap();
assert_eq!(resp.status(), 200);
}

View File

@@ -20,6 +20,7 @@ mod timeout;
type RequestHandler = dyn Fn(&Unit) -> Result<Stream, Error> + Send + 'static;
#[allow(clippy::type_complexity)]
pub(crate) static TEST_HANDLERS: Lazy<Arc<Mutex<HashMap<String, Box<RequestHandler>>>>> =
Lazy::new(|| Arc::new(Mutex::new(HashMap::new())));