chore: bump rust edition to 2024

This commit is contained in:
alyssa 2025-09-01 03:36:13 +00:00
parent 214f164fbc
commit ebb23286d8
41 changed files with 70 additions and 69 deletions

View file

@ -1,7 +1,7 @@
[package]
name = "dispatch"
version = "0.1.0"
edition = "2021"
edition = "2024"
[dependencies]
anyhow = { workspace = true }

View file

@ -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

View file

@ -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");