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
}
+1 -1
View File
@@ -65,7 +65,7 @@ async fn smoke_server_stream() {
let r3 = stream(r3).await;
let r4 = stream(r4).await;
assert!(&r1 == &r2 && &r2 == &r3 && &r3 == &r4);
assert!(r1 == r2 && r2 == r3 && r3 == r4);
}
#[tokio::test]
async fn smoke_error() {