diff --git a/src/models/info_hash.rs b/src/models/info_hash.rs index 3925d4a4..342d0fc3 100644 --- a/src/models/info_hash.rs +++ b/src/models/info_hash.rs @@ -195,7 +195,7 @@ impl Ord for InfoHash { impl std::cmp::PartialOrd for InfoHash { fn partial_cmp(&self, other: &InfoHash) -> Option { - self.0.partial_cmp(&other.0) + Some(self.cmp(other)) } } diff --git a/src/web/api/v1/contexts/torrent/handlers.rs b/src/web/api/v1/contexts/torrent/handlers.rs index a3e40327..85bbd1f9 100644 --- a/src/web/api/v1/contexts/torrent/handlers.rs +++ b/src/web/api/v1/contexts/torrent/handlers.rs @@ -309,7 +309,7 @@ async fn get_torrent_request_from_payload(mut payload: Multipart) -> Result = 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" => { @@ -342,7 +342,7 @@ async fn get_torrent_request_from_payload(mut payload: Multipart) -> Result { - 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);