Fix clippy errors

pictrs-no-gzip
Felix Ableitner 2021-09-17 11:56:44 +02:00
parent 3c54b00ffa
commit 625b959eed
2 changed files with 2 additions and 9 deletions

View File

@ -18,19 +18,11 @@ pub(crate) enum RateLimitType {
}
/// Rate limiting based on rate type and IP addr
#[derive(Debug, Clone)]
#[derive(Debug, Clone, Default)]
pub struct RateLimiter {
buckets: HashMap<RateLimitType, HashMap<IpAddr, RateLimitBucket>>,
}
impl Default for RateLimiter {
fn default() -> Self {
Self {
buckets: HashMap::<RateLimitType, HashMap<IpAddr, RateLimitBucket>>::new(),
}
}
}
impl RateLimiter {
fn insert_ip(&mut self, ip: &IpAddr) {
for rate_limit_type in RateLimitType::iter() {

View File

@ -114,6 +114,7 @@ pub(crate) struct PictrsResponse {
#[derive(Deserialize, Debug, Clone)]
pub(crate) struct PictrsFile {
file: String,
#[allow(dead_code)]
delete_token: String,
}