Remove async-traits

This commit is contained in:
Dreaded_X 2025-03-22 03:20:16 +01:00
parent 4308312a61
commit 2e952ea8cd
Signed by: Dreaded_X
GPG Key ID: FA5F485356B0D2D4
5 changed files with 1 additions and 9 deletions

1
Cargo.lock generated
View File

@ -1425,7 +1425,6 @@ name = "lldap-controller"
version = "0.1.0"
dependencies = [
"anyhow",
"async-trait",
"chrono",
"cynic",
"futures",

View File

@ -30,7 +30,6 @@ tracing = "0.1.41"
thiserror = "2.0.12"
chrono = "0.4.40"
passwords = "3.1.16"
async-trait = "0.1.88"
reqwest = { version = "0.12.14", default-features = false, features = [
"json",
"rustls-tls",

View File

@ -1,4 +1,3 @@
use async_trait::async_trait;
use k8s_openapi::api::core::v1::Secret;
use kube::runtime::events::{Event, EventType, Recorder, Reporter};
use kube::{Resource, ResourceExt};
@ -26,7 +25,7 @@ impl Context {
}
}
#[async_trait]
#[allow(async_fn_in_trait)]
pub trait ControllerEvents {
type Error;
@ -47,7 +46,6 @@ pub trait ControllerEvents {
T: Resource<DynamicType = ()> + Sync;
}
#[async_trait]
impl ControllerEvents for Recorder {
type Error = kube::Error;

View File

@ -3,7 +3,6 @@ mod service_user;
use core::fmt;
use std::sync::Arc;
use async_trait::async_trait;
use k8s_openapi::NamespaceResourceScope;
use kube::runtime::controller::Action;
use kube::runtime::finalizer;
@ -38,7 +37,6 @@ impl From<finalizer::Error<Self>> for Error {
type Result<T, E = Error> = std::result::Result<T, E>;
#[async_trait]
trait Reconcile {
async fn reconcile(self: Arc<Self>, ctx: Arc<Context>) -> Result<Action>;

View File

@ -3,7 +3,6 @@ use std::str::from_utf8;
use std::sync::Arc;
use std::time::Duration;
use async_trait::async_trait;
use chrono::{DateTime, Utc};
use k8s_openapi::api::core::v1::Secret;
use k8s_openapi::apimachinery::pkg::apis::meta::v1::OwnerReference;
@ -76,7 +75,6 @@ fn format_username(name: &str, namespace: &str) -> String {
format!("{name}.{namespace}")
}
#[async_trait]
impl Reconcile for ServiceUser {
async fn reconcile(self: Arc<Self>, ctx: Arc<Context>) -> Result<Action> {
let name = self