Skip to content

Commit

Permalink
fix clippy warning
Browse files Browse the repository at this point in the history
  • Loading branch information
shouya committed Aug 5, 2024
1 parent f5b1e68 commit de47a65
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/server/endpoint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ impl EndpointService {
let feed = self
.run(param)
.await
.map_err(|e| e.as_response().into_response())?;
.map_err(|e| e.into_http().into_response())?;
let resp = feed.into_response();
Ok(resp)
}
Expand Down
4 changes: 2 additions & 2 deletions src/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,10 @@ pub enum Error {
}

impl Error {
pub fn as_response(self) -> (StatusCode, String) {
pub fn into_http(self) -> (StatusCode, String) {
match self {
Error::FetchSource(e) => {
let (status, body) = e.as_response();
let (status, body) = e.into_http();
(status, format!("Error fetching source: {body}"))
}
Error::HttpStatus(status, url) => {
Expand Down

0 comments on commit de47a65

Please sign in to comment.