Skip to content

Commit

Permalink
fix: clippy warnings alter updating clippy to clippy 0.1.73
Browse files Browse the repository at this point in the history
  • Loading branch information
josecelano committed Jul 31, 2023
1 parent b269ecb commit dfa260e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/models/info_hash.rs
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ impl Ord for InfoHash {

impl std::cmp::PartialOrd<InfoHash> for InfoHash {
fn partial_cmp(&self, other: &InfoHash) -> Option<std::cmp::Ordering> {
self.0.partial_cmp(&other.0)
Some(self.cmp(other))
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/web/api/v1/contexts/torrent/handlers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ async fn get_torrent_request_from_payload(mut payload: Multipart) -> Result<AddT
let mut tags: Vec<TagId> = vec![];

while let Some(mut field) = payload.next_field().await.unwrap() {
let name = field.name().unwrap().clone();
let name = field.name().unwrap();

match name {
"title" => {
Expand Down Expand Up @@ -342,7 +342,7 @@ async fn get_torrent_request_from_payload(mut payload: Multipart) -> Result<AddT
tags = serde_json::from_str(&string_data).map_err(|_| ServiceError::BadRequest)?;
}
"torrent" => {
let content_type = field.content_type().unwrap().clone();
let content_type = field.content_type().unwrap();

if content_type != "application/x-bittorrent" {
return Err(ServiceError::InvalidFileType);
Expand Down

0 comments on commit dfa260e

Please sign in to comment.