Skip to content

Commit d72359b

Browse files
remove generic parameter from Contract struct
1 parent df04615 commit d72359b

File tree

2 files changed

+12
-6
lines changed

2 files changed

+12
-6
lines changed

tests-expanded/test_generics_tests.rs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ extern crate core;
55
#[prelude_import]
66
use core::prelude::rust_2021::*;
77
use soroban_sdk::{contract, contractimpl};
8-
pub struct Contract<ABC>;
8+
pub struct Contract;
99
///ContractArgs is a type for building arg lists for functions defined in "Contract".
1010
pub struct ContractArgs;
1111
///ContractClient is a client for calling the contract defined in "Contract".
@@ -136,7 +136,10 @@ impl soroban_sdk::testutils::ContractFunctionSet for Contract {
136136
__contract_fn_set_registry::call(func, env, args)
137137
}
138138
}
139-
impl<'i> Contract {
139+
impl<'a, 'b> Contract
140+
where
141+
'a: 'b,
142+
{
140143
pub fn empty() {}
141144
}
142145
#[doc(hidden)]
@@ -312,9 +315,9 @@ mod test {
312315
ignore: false,
313316
ignore_message: ::core::option::Option::None,
314317
source_file: "tests/generics/src/lib.rs",
315-
start_line: 19usize,
318+
start_line: 28usize,
316319
start_col: 8usize,
317-
end_line: 19usize,
320+
end_line: 28usize,
318321
end_col: 18usize,
319322
compile_fail: false,
320323
no_run: false,

tests-expanded/test_generics_wasm32v1-none.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ extern crate core;
55
#[prelude_import]
66
use core::prelude::rust_2021::*;
77
use soroban_sdk::{contract, contractimpl};
8-
pub struct Contract<ABC>;
8+
pub struct Contract;
99
///ContractArgs is a type for building arg lists for functions defined in "Contract".
1010
pub struct ContractArgs;
1111
///ContractClient is a client for calling the contract defined in "Contract".
@@ -24,7 +24,10 @@ impl<'a> ContractClient<'a> {
2424
}
2525
}
2626
}
27-
impl<'i> Contract {
27+
impl<'a, 'b> Contract
28+
where
29+
'a: 'b,
30+
{
2831
pub fn empty() {}
2932
}
3033
#[doc(hidden)]

0 commit comments

Comments
 (0)