mirror of
https://github.com/fluencelabs/marine-rs-sdk-test
synced 2024-12-04 15:20:18 +00:00
more houskeeping
This commit is contained in:
parent
de2e61e60b
commit
6911e72ecc
@ -99,7 +99,8 @@ fn generate_module_ctors<'n>(
|
||||
let name_for_user = fce_test::utils::new_ident(&name)?;
|
||||
|
||||
let module_ctor =
|
||||
quote! { let mut #name_for_user = #module_name::#struct_name { fce: fce.clone() }; };
|
||||
quote! { let mut #name_for_user = #module_name::#struct_name::new(fce.clone()); };
|
||||
|
||||
module_ctors.push(module_ctor);
|
||||
}
|
||||
|
||||
|
@ -59,7 +59,13 @@ fn generate_module_definition(
|
||||
#module_records
|
||||
|
||||
pub struct #struct_name_ident {
|
||||
pub fce: std::rc::Rc<std::cell::RefCell<fluence_test::internal::AppService>>,
|
||||
fce: std::rc::Rc<std::cell::RefCell<fluence_test::internal::AppService>>,
|
||||
}
|
||||
|
||||
impl #struct_name_ident {
|
||||
pub fn new(fce: std::rc::Rc<std::cell::RefCell<fluence_test::internal::AppService>>) -> Self {
|
||||
Self { fce }
|
||||
}
|
||||
}
|
||||
|
||||
impl #struct_name_ident {
|
||||
|
@ -1,41 +0,0 @@
|
||||
/*
|
||||
* Copyright 2020 Fluence Labs Limited
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
use crate::attributes::FCETestAttributes;
|
||||
use crate::TResult;
|
||||
use crate::TestGeneratorError;
|
||||
|
||||
use fluence_app_service::TomlAppServiceConfig;
|
||||
use proc_macro2::TokenStream;
|
||||
use quote::quote;
|
||||
use quote::ToTokens;
|
||||
|
||||
|
||||
|
||||
use fce_wit_parser::module_raw_interface;
|
||||
use fce_wit_parser::interface::FCEModuleInterface;
|
||||
use fce_wit_parser::interface::FCERecordTypes;
|
||||
use fce_wit_parser::interface::FCEFunctionSignature;
|
||||
use fce_wit_parser::interface::it::IFunctionArg;
|
||||
use fce_wit_parser::interface::it::IRecordFieldType;
|
||||
use fce_wit_parser::interface::it::IType;
|
||||
|
||||
use std::path::PathBuf;
|
||||
use syn::parse::Parser;
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user