mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 04:56:49 +00:00
chore: cargo fmt
This commit is contained in:
parent
c8b6dc4c23
commit
299be27031
4 changed files with 8 additions and 5 deletions
|
|
@ -6,7 +6,7 @@ use axum::{
|
|||
middleware::{FromFnLayer, Next},
|
||||
response::Response,
|
||||
};
|
||||
use fred::{clients::RedisPool, prelude::LuaInterface, util::sha1_hash, interfaces::ClientLike};
|
||||
use fred::{clients::RedisPool, interfaces::ClientLike, prelude::LuaInterface, util::sha1_hash};
|
||||
use metrics::counter;
|
||||
use tracing::{debug, error, info, warn};
|
||||
|
||||
|
|
@ -45,7 +45,10 @@ pub fn ratelimiter<F, T>(f: F) -> FromFnLayer<F, Option<RedisPool>, T> {
|
|||
let rscript = r.clone();
|
||||
tokio::spawn(async move {
|
||||
if let Ok(()) = rscript.wait_for_connect().await {
|
||||
match rscript.script_load::<String, String>(LUA_SCRIPT.to_string()).await {
|
||||
match rscript
|
||||
.script_load::<String, String>(LUA_SCRIPT.to_string())
|
||||
.await
|
||||
{
|
||||
Ok(_) => info!("connected to redis for request rate limiting"),
|
||||
Err(err) => error!("could not load redis script: {}", err),
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
use fred::{
|
||||
clients::RedisPool,
|
||||
error::RedisError,
|
||||
interfaces::KeysInterface,
|
||||
clients::RedisPool,
|
||||
types::{Expiration, SetOptions},
|
||||
};
|
||||
use std::fmt::Debug;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
use bytes::Bytes;
|
||||
use fred::{interfaces::HashesInterface, clients::RedisPool};
|
||||
use fred::{clients::RedisPool, interfaces::HashesInterface};
|
||||
use prost::Message;
|
||||
use tracing::info;
|
||||
use twilight_gateway::Event;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
use chrono::Timelike;
|
||||
use fred::{interfaces::*, clients::RedisPool};
|
||||
use fred::{clients::RedisPool, interfaces::*};
|
||||
use signal_hook::{
|
||||
consts::{SIGINT, SIGTERM},
|
||||
iterator::Signals,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue