Fix clippy error (?)

This commit is contained in:
Geometrically
2021-01-01 09:13:27 -07:00
parent ee8d65977d
commit a40b9f4054
2 changed files with 20 additions and 15 deletions

View File

@@ -8,6 +8,7 @@ use actix_web::{delete, get, patch, web, HttpRequest, HttpResponse};
use serde::{Deserialize, Serialize};
use sqlx::PgPool;
use std::sync::Arc;
use std::borrow::Borrow;
// TODO: this needs filtering, and a better response type
// Currently it only gives a list of ids, which have to be
@@ -659,7 +660,7 @@ pub async fn download_version(
if let Some(id) = result {
let real_ip = req.connection_info();
let ip_option = real_ip.realip_remote_addr();
let ip_option = real_ip.borrow().remote_addr();
if let Some(ip) = ip_option {
let hash = sha1::Sha1::from(format!("{}{}", ip, pepper.pepper)).hexdigest();