Skip to content

Commit

Permalink
clippy clean
Browse files Browse the repository at this point in the history
  • Loading branch information
sunli829 committed Dec 17, 2022
1 parent 659b1b3 commit dabff24
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion poem/src/listener/acme/jose.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ impl Jwk {
let json = serde_json::to_vec(&jwk_thumb).map_err(|err| {
IoError::new(ErrorKind::Other, format!("failed to encode jwt: {}", err))
})?;
let hash = sha256(&json);
let hash = sha256(json);
Ok(base64::encode_config(hash, URL_SAFE_NO_PAD))
}
}
Expand Down
2 changes: 1 addition & 1 deletion poem/src/middleware/tracing_mw.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ impl<E: Endpoint> Endpoint for TracingEndpoint<E> {
);

if let Some(path_pattern) = req.data::<PathPattern>() {
span.record("path_pattern", &path_pattern.0.as_ref());
span.record("path_pattern", path_pattern.0.as_ref());
}

async move {
Expand Down
2 changes: 1 addition & 1 deletion poem/src/web/static_file.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ impl IntoResponse for StaticFileResponse {
.header(header::CONTENT_LENGTH, content_length);

if let Some(content_type) = content_type {
builder = builder.content_type(&content_type);
builder = builder.content_type(content_type);
}
if let Some(etag) = etag {
builder = builder.header(header::ETAG, etag);
Expand Down

0 comments on commit dabff24

Please sign in to comment.