feat: upgrade to edition 2024
All checks were successful
/ build (push) Successful in 1s
/ check-integration-tests (push) Successful in 9s
/ report-size (push) Successful in 1s

Finally pulled the trigger!
This commit is contained in:
Jalil David Salamé Messina 2025-05-16 18:40:25 +02:00
parent 95cfb31b9a
commit ccdc651584
Signed by: jalil
GPG key ID: F016B9E770737A0B
5 changed files with 9 additions and 9 deletions

View file

@ -2,7 +2,7 @@
description = "An HTTP server using HTTP basic auth to make secure calls to nsupdate" description = "An HTTP server using HTTP basic auth to make secure calls to nsupdate"
name = "webnsupdate" name = "webnsupdate"
version = "0.3.6" version = "0.3.6"
edition = "2021" edition = "2024"
license = "MIT" license = "MIT"
readme = "README.md" readme = "README.md"
keywords = ["dns", "dyndns", "dynamic-ip"] keywords = ["dns", "dyndns", "dynamic-ip"]

View file

@ -1,5 +1,5 @@
use base64::engine::general_purpose::URL_SAFE_NO_PAD;
use base64::Engine; use base64::Engine;
use base64::engine::general_purpose::URL_SAFE_NO_PAD;
use tower_http::validate_request::ValidateRequestHeaderLayer; use tower_http::validate_request::ValidateRequestHeaderLayer;
use tracing::{trace, warn}; use tracing::{trace, warn};

View file

@ -6,17 +6,17 @@ use std::{
}; };
use axum::{ use axum::{
Router,
extract::{Query, State}, extract::{Query, State},
routing::get, routing::get,
Router,
}; };
use axum_client_ip::ClientIp; use axum_client_ip::ClientIp;
use base64::{engine::general_purpose::URL_SAFE_NO_PAD, Engine}; use base64::{Engine, engine::general_purpose::URL_SAFE_NO_PAD};
use clap::{Parser, Subcommand}; use clap::{Parser, Subcommand};
use clap_verbosity_flag::Verbosity; use clap_verbosity_flag::Verbosity;
use config::Config; use config::Config;
use http::StatusCode; use http::StatusCode;
use miette::{bail, ensure, Context, IntoDiagnostic, Result}; use miette::{Context, IntoDiagnostic, Result, bail, ensure};
use tracing::{debug, error, info}; use tracing::{debug, error, info};
use tracing_subscriber::EnvFilter; use tracing_subscriber::EnvFilter;
@ -121,7 +121,7 @@ impl SavedIPs {
} }
} }
fn ips(&self) -> impl Iterator<Item = IpAddr> { fn ips(&self) -> impl Iterator<Item = IpAddr> + use<> {
self.ipv4 self.ipv4
.map(IpAddr::V4) .map(IpAddr::V4)
.into_iter() .into_iter()
@ -215,7 +215,7 @@ fn load_ip(path: &Path) -> Result<Option<SavedIPs>> {
_ => Err(err).into_diagnostic().wrap_err_with(|| { _ => Err(err).into_diagnostic().wrap_err_with(|| {
format!("failed to load last ip address from {}", path.display()) format!("failed to load last ip address from {}", path.display())
}), }),
} };
} }
}; };

View file

@ -103,7 +103,7 @@ mod test {
use insta::assert_snapshot; use insta::assert_snapshot;
use super::{update_ns_records, Action}; use super::{Action, update_ns_records};
use crate::DEFAULT_TTL; use crate::DEFAULT_TTL;
#[test] #[test]

View file

@ -1,6 +1,6 @@
//! Deal with the DNS records //! Deal with the DNS records
use miette::{ensure, miette, LabeledSpan, Result}; use miette::{LabeledSpan, Result, ensure, miette};
pub fn validate_record_str(record: &str) -> Result<()> { pub fn validate_record_str(record: &str) -> Result<()> {
validate_line(0, record).map_err(|err| err.with_source_code(String::from(record))) validate_line(0, record).map_err(|err| err.with_source_code(String::from(record)))