Remove async-traits
This commit is contained in:
parent
4308312a61
commit
2e952ea8cd
1
Cargo.lock
generated
1
Cargo.lock
generated
|
@ -1425,7 +1425,6 @@ name = "lldap-controller"
|
|||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"async-trait",
|
||||
"chrono",
|
||||
"cynic",
|
||||
"futures",
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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>;
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user