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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user