chore: fix clippy lints (#707)

This commit is contained in:
David Pedersen
2021-07-09 18:23:55 +02:00
committed by GitHub
parent 5aa8ae1fec
commit 4b0ece6d28
19 changed files with 47 additions and 41 deletions
+1 -1
View File
@@ -235,7 +235,7 @@ impl Encoding {
Self::from_header(headers.get(header::ACCEPT))
}
pub(crate) fn to_content_type(&self) -> &'static str {
pub(crate) fn to_content_type(self) -> &'static str {
match self {
Encoding::Base64 => GRPC_WEB_TEXT_PROTO,
Encoding::None => GRPC_WEB_PROTO,
+1 -1
View File
@@ -161,7 +161,7 @@ mod tests {
($header:expr, $expected:expr) => {
fn sorted(value: &str) -> Vec<&str> {
let mut vec = value.split(",").collect::<Vec<_>>();
vec.sort();
vec.sort_unstable();
vec
}