mirror of
https://github.com/Noratrieb/terustform.git
synced 2026-01-14 16:35:11 +01:00
Remove the need for async_trait for data source
This commit is contained in:
parent
bd90f5c978
commit
edf7b7dac3
9 changed files with 30 additions and 12 deletions
|
|
@ -20,7 +20,6 @@ struct ClassDataSourceModel {
|
|||
discord_id: StringValue,
|
||||
}
|
||||
|
||||
#[terustform::async_trait]
|
||||
impl DataSource for ClassDataSource {
|
||||
type ProviderData = CorsClient;
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,7 @@
|
|||
use terustform::{datasource::DataSource, DResult, Value};
|
||||
|
||||
use crate::client::CorsClient;
|
||||
|
||||
pub struct ClassResource {
|
||||
client: CorsClient,
|
||||
}
|
||||
|
|
@ -17,7 +17,6 @@ struct HugoDataSourceModel {
|
|||
hugo: StringValue,
|
||||
}
|
||||
|
||||
#[terustform::async_trait]
|
||||
impl DataSource for HugoDataSource {
|
||||
type ProviderData = CorsClient;
|
||||
|
||||
|
|
|
|||
|
|
@ -16,7 +16,6 @@ struct ExampleDataSourceModel {
|
|||
id: StringValue,
|
||||
}
|
||||
|
||||
#[terustform::async_trait]
|
||||
impl DataSource for ExampleDataSource {
|
||||
type ProviderData = CorsClient;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
pub mod class_data_source;
|
||||
pub mod hugo;
|
||||
pub mod kitty;
|
||||
pub mod class_resource;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue