mirror of https://github.com/LemmyNet/lemmy.git
Fix clippy errors
parent
3c54b00ffa
commit
625b959eed
|
@ -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() {
|
||||
|
|
|
@ -114,6 +114,7 @@ pub(crate) struct PictrsResponse {
|
|||
#[derive(Deserialize, Debug, Clone)]
|
||||
pub(crate) struct PictrsFile {
|
||||
file: String,
|
||||
#[allow(dead_code)]
|
||||
delete_token: String,
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue