Remove the need for async_trait for data source

This commit is contained in:
nora 2024-04-29 19:57:16 +02:00
parent bd90f5c978
commit edf7b7dac3
9 changed files with 30 additions and 12 deletions

View file

@ -20,7 +20,6 @@ struct ClassDataSourceModel {
discord_id: StringValue,
}
#[terustform::async_trait]
impl DataSource for ClassDataSource {
type ProviderData = CorsClient;

View file

@ -0,0 +1,7 @@
use terustform::{datasource::DataSource, DResult, Value};
use crate::client::CorsClient;
pub struct ClassResource {
client: CorsClient,
}

View file

@ -17,7 +17,6 @@ struct HugoDataSourceModel {
hugo: StringValue,
}
#[terustform::async_trait]
impl DataSource for HugoDataSource {
type ProviderData = CorsClient;

View file

@ -16,7 +16,6 @@ struct ExampleDataSourceModel {
id: StringValue,
}
#[terustform::async_trait]
impl DataSource for ExampleDataSource {
type ProviderData = CorsClient;

View file

@ -1,3 +1,4 @@
pub mod class_data_source;
pub mod hugo;
pub mod kitty;
pub mod class_resource;