diff --git a/Cargo.lock b/Cargo.lock index 3128f72..6f87991 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1425,7 +1425,6 @@ name = "lldap-controller" version = "0.1.0" dependencies = [ "anyhow", - "async-trait", "chrono", "cynic", "futures", diff --git a/Cargo.toml b/Cargo.toml index 7f2a615..c4640dd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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", diff --git a/src/context.rs b/src/context.rs index cc265d6..5fe9705 100644 --- a/src/context.rs +++ b/src/context.rs @@ -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 + Sync; } -#[async_trait] impl ControllerEvents for Recorder { type Error = kube::Error; diff --git a/src/resources/mod.rs b/src/resources/mod.rs index 8a5ad1d..3edbce7 100644 --- a/src/resources/mod.rs +++ b/src/resources/mod.rs @@ -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> for Error { type Result = std::result::Result; -#[async_trait] trait Reconcile { async fn reconcile(self: Arc, ctx: Arc) -> Result; diff --git a/src/resources/service_user.rs b/src/resources/service_user.rs index d4aaf93..6aece96 100644 --- a/src/resources/service_user.rs +++ b/src/resources/service_user.rs @@ -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, ctx: Arc) -> Result { let name = self