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

@@ -799,9 +799,9 @@ pub(crate) fn charset_from_content_type(header: Option<&str>) -> &str {
header
.and_then(|header| {
header.find(';').and_then(|semi| {
(&header[semi + 1..])
header[semi + 1..]
.find('=')
.map(|equal| (&header[semi + equal + 2..]).trim())
.map(|equal| header[semi + equal + 2..].trim())
})
})
.unwrap_or(DEFAULT_CHARACTER_SET)