mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 13:06:50 +00:00
chore: bump rust edition to 2024
This commit is contained in:
parent
214f164fbc
commit
ebb23286d8
41 changed files with 70 additions and 69 deletions
|
|
@ -1,7 +1,7 @@
|
|||
[package]
|
||||
name = "dispatch"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
edition = "2024"
|
||||
|
||||
[dependencies]
|
||||
anyhow = { workspace = true }
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
use std::time::Instant;
|
||||
|
||||
use axum::{extract::MatchedPath, extract::Request, middleware::Next, response::Response};
|
||||
use tracing::{info, span, warn, Instrument, Level};
|
||||
use tracing::{Instrument, Level, info, span, warn};
|
||||
|
||||
// log any requests that take longer than 2 seconds
|
||||
// todo: change as necessary
|
||||
|
|
|
|||
|
|
@ -5,17 +5,16 @@ use hickory_client::{
|
|||
rr::{DNSClass, Name, RData, RecordType},
|
||||
udp::UdpClientStream,
|
||||
};
|
||||
use reqwest::{redirect::Policy, StatusCode};
|
||||
use reqwest::{StatusCode, redirect::Policy};
|
||||
use std::{
|
||||
net::{Ipv4Addr, SocketAddr, SocketAddrV4},
|
||||
sync::Arc,
|
||||
time::Duration,
|
||||
};
|
||||
use tokio::{net::UdpSocket, sync::RwLock};
|
||||
use tracing::{debug, error, info};
|
||||
use tracing_subscriber::EnvFilter;
|
||||
use tracing::{debug, error};
|
||||
|
||||
use axum::{extract::State, http::Uri, routing::post, Json, Router};
|
||||
use axum::{Json, Router, extract::State, http::Uri, routing::post};
|
||||
|
||||
mod logger;
|
||||
|
||||
|
|
@ -128,7 +127,7 @@ async fn dispatch(
|
|||
|
||||
match res {
|
||||
Ok(res) if res.status() != 200 => {
|
||||
return DispatchResponse::InvalidResponseCode(res.status()).to_string()
|
||||
return DispatchResponse::InvalidResponseCode(res.status()).to_string();
|
||||
}
|
||||
Err(error) => {
|
||||
error!(?error, url = req.url.clone(), "failed to fetch");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue